JOnAS 5 and EasyBeans make clustering easy › ... › ClusteringJOnAS5.pdf · Jk/Tomcat 6...

28
© OW2 Consortium 2008 JOnAS 5 and EasyBeans make clustering easy [email protected] http://jonas.ow2.org

Transcript of JOnAS 5 and EasyBeans make clustering easy › ... › ClusteringJOnAS5.pdf · Jk/Tomcat 6...

Page 1: JOnAS 5 and EasyBeans make clustering easy › ... › ClusteringJOnAS5.pdf · Jk/Tomcat 6 clustering Mod_jk Last, 1.2.26 Java Api for managing the configuration (JkStatus ant task)

© OW2 Consortium 2008

JOnAS 5 and EasyBeans make clustering easy

[email protected]://jonas.ow2.org

Page 2: JOnAS 5 and EasyBeans make clustering easy › ... › ClusteringJOnAS5.pdf · Jk/Tomcat 6 clustering Mod_jk Last, 1.2.26 Java Api for managing the configuration (JkStatus ant task)

© OW2 Consortium 2008

Introduction

Java EE clustering for Scalability High availability

Java EE cluster

Means Load­balancing Replication Fail­over

Page 3: JOnAS 5 and EasyBeans make clustering easy › ... › ClusteringJOnAS5.pdf · Jk/Tomcat 6 clustering Mod_jk Last, 1.2.26 Java Api for managing the configuration (JkStatus ant task)

© OW2 Consortium 2008

Agenda

JOnAS 5.0 is available !

News in clustering Jk/Tomcat 6 Clustering CMI V2, a powerful clustering solution for EJB2/EJB3 Some enhancements in the cluster management

Next

Page 4: JOnAS 5 and EasyBeans make clustering easy › ... › ClusteringJOnAS5.pdf · Jk/Tomcat 6 clustering Mod_jk Last, 1.2.26 Java Api for managing the configuration (JkStatus ant task)

4© OW2 Consortium 2008

JOnAS 5.0

Page 5: JOnAS 5 and EasyBeans make clustering easy › ... › ClusteringJOnAS5.pdf · Jk/Tomcat 6 clustering Mod_jk Last, 1.2.26 Java Api for managing the configuration (JkStatus ant task)

© OW2 Consortium 2008

Agenda

JOnAS 5.0 is available !

News in clustering Jk/Tomcat 6 Clustering CMI V2, a powerful clustering solution for EJB2/EJB3 Some enhancements in the cluster management

Next

Page 6: JOnAS 5 and EasyBeans make clustering easy › ... › ClusteringJOnAS5.pdf · Jk/Tomcat 6 clustering Mod_jk Last, 1.2.26 Java Api for managing the configuration (JkStatus ant task)

© OW2 Consortium 2008

Jk/Tomcat 6 clustering

Mod_jk Last, 1.2.26 Java Api for managing the configuration (JkStatus ant task)

Session replication enhancements Primary/Backup mode for scalability

• org.apache.catalina.ha.session.BackupManager Store session at one or two backup servers Communication between nodes relies on Apache/Tribes 

project

Page 7: JOnAS 5 and EasyBeans make clustering easy › ... › ClusteringJOnAS5.pdf · Jk/Tomcat 6 clustering Mod_jk Last, 1.2.26 Java Api for managing the configuration (JkStatus ant task)

© OW2 Consortium 2008

Agenda

JOnAS 5.0 is available !

News in clustering Jk/Tomcat 6 Clustering CMI V2, a powerful clustering solution for 

EJB2/EJB3 Some enhancements in the cluster management

Next

Page 8: JOnAS 5 and EasyBeans make clustering easy › ... › ClusteringJOnAS5.pdf · Jk/Tomcat 6 clustering Mod_jk Last, 1.2.26 Java Api for managing the configuration (JkStatus ant task)

© OW2 Consortium 2008

Integration with JOnAS EJB2.1 container and Easybeans EJB3 container

SLSB EJB3 support (SFSB coming soon)

Beyond java EE, CMI might be used for clustering RMI objects

EJB2 and EJB3 support

Page 9: JOnAS 5 and EasyBeans make clustering easy › ... › ClusteringJOnAS5.pdf · Jk/Tomcat 6 clustering Mod_jk Last, 1.2.26 Java Api for managing the configuration (JkStatus ant task)

© OW2 Consortium 2008

jrmp, iiop, irmi

Modularity, the CMI layer is separated of the protocol ones

Multi-protocols support

jrmp iiop irmi

cmi

carol

appli

Page 10: JOnAS 5 and EasyBeans make clustering easy › ... › ClusteringJOnAS5.pdf · Jk/Tomcat 6 clustering Mod_jk Last, 1.2.26 Java Api for managing the configuration (JkStatus ant task)

© OW2 Consortium 2008

Service and control flows separation, last one handled by a dedicated thread

Stubs pool Management capability coming soon

Performance oriented

Control flow

Service flow

Stubs pool

Page 11: JOnAS 5 and EasyBeans make clustering easy › ... › ClusteringJOnAS5.pdf · Jk/Tomcat 6 clustering Mod_jk Last, 1.2.26 Java Api for managing the configuration (JkStatus ant task)

© OW2 Consortium 2008

Dynamic load-balancing parameters 1/2

J1Update Cluster logic

Master node

Ctrl flow

Cluster logic V1Cluster logic V2

Cluster logic is downloaded from the server Provided policies : round robin, first available, ha singleton, 

random Different strategies : local preference, load factor, …

Can be updated at the runtime from jonasAdmin (JMX)

Page 12: JOnAS 5 and EasyBeans make clustering easy › ... › ClusteringJOnAS5.pdf · Jk/Tomcat 6 clustering Mod_jk Last, 1.2.26 Java Api for managing the configuration (JkStatus ant task)

© OW2 Consortium 2008

Dynamic load-balancing parameters

2/2

J1

Page 13: JOnAS 5 and EasyBeans make clustering easy › ... › ClusteringJOnAS5.pdf · Jk/Tomcat 6 clustering Mod_jk Last, 1.2.26 Java Api for managing the configuration (JkStatus ant task)

© OW2 Consortium 2008

Stopping without service/session interruption Disables the server, the new connections are refused, only 

the existing clients are served

Blacklist a server through JMX interface or jonasAdmin console

Smooth stopping

Page 14: JOnAS 5 and EasyBeans make clustering easy › ... › ClusteringJOnAS5.pdf · Jk/Tomcat 6 clustering Mod_jk Last, 1.2.26 Java Api for managing the configuration (JkStatus ant task)

© OW2 Consortium 2008

Automatic switch  cmi if available, otherwise jrmp

Cluster mode transparent for the client

Page 15: JOnAS 5 and EasyBeans make clustering easy › ... › ClusteringJOnAS5.pdf · Jk/Tomcat 6 clustering Mod_jk Last, 1.2.26 Java Api for managing the configuration (JkStatus ant task)

© OW2 Consortium 2008

Reduced API not linked to the JOnAS version and the application Upper layer classes are downloaded from the server 

(smartfactory)

Large Scalesupport

Client JVM

API CMIAPP SF

1.Fi

rst l

ooku

p

Cluster2. Socket connection

3. API download

4. Lookup processing

Page 16: JOnAS 5 and EasyBeans make clustering easy › ... › ClusteringJOnAS5.pdf · Jk/Tomcat 6 clustering Mod_jk Last, 1.2.26 Java Api for managing the configuration (JkStatus ant task)

© OW2 Consortium 2008

Deployment Descriptor (specific) ‘cluster­policy’ element specifies the policy configuration file 

name

‘cluster­replicated’ element specifies whether the SFSB must be replicated

Configuration file example (round­robin­policy.xml, located in the ejb­jar module)

EJB2 ClusteringParameters

<cmi xmlns="http://org.ow2.carol.cmi.info.mapping"> <clusteredObject> <clusterName>sampleCluster2</clusterName> <policyType>org.ow2.carol.cmi.lb.policy.RoundRobinPolicy</policyType> <strategyType>org.ow2.carol.cmi.lb.strategy.LocalPreference</policyType> </clusteredObject></cmi>

Administration purposes

… <cluster-policy>round-robin-policy.xml</cluster-policy>…

… <cluster-replicated>round-robin-policy.xml</cluster-replicated>…

Page 17: JOnAS 5 and EasyBeans make clustering easy › ... › ClusteringJOnAS5.pdf · Jk/Tomcat 6 clustering Mod_jk Last, 1.2.26 Java Api for managing the configuration (JkStatus ant task)

© OW2 Consortium 2008

Annotations  Set the cluster logic parameters Example

EJB3 ClusteringParameters

@Cluster(name="test_cluster")@LBPolicy(RoundRobinPolicy.class)@LBStrategy(LocalPreference.class)

@Stateless@Remote(StatelessSession.class)public class StatelessSessionBean implements StatelessSession {…}

Administration purposes

Page 18: JOnAS 5 and EasyBeans make clustering easy › ... › ClusteringJOnAS5.pdf · Jk/Tomcat 6 clustering Mod_jk Last, 1.2.26 Java Api for managing the configuration (JkStatus ant task)

© OW2 Consortium 2008

Agenda

JOnAS 5.0 is available !

News in clustering Jk/Tomcat 6 Clustering CMI V2, a powerful clustering solution for EJB2/EJB3 Some enhancements in the cluster management

Next

Page 19: JOnAS 5 and EasyBeans make clustering easy › ... › ClusteringJOnAS5.pdf · Jk/Tomcat 6 clustering Mod_jk Last, 1.2.26 Java Api for managing the configuration (JkStatus ant task)

© OW2 Consortium 2008

Domain management

Server 2

Server 1

master Domain

JMX Rem

ote

Page 20: JOnAS 5 and EasyBeans make clustering easy › ... › ClusteringJOnAS5.pdf · Jk/Tomcat 6 clustering Mod_jk Last, 1.2.26 Java Api for managing the configuration (JkStatus ant task)

© OW2 Consortium 2008

Log visualizationfrom jonasAdmin

Remote access through domain management

Page 21: JOnAS 5 and EasyBeans make clustering easy › ... › ClusteringJOnAS5.pdf · Jk/Tomcat 6 clustering Mod_jk Last, 1.2.26 Java Api for managing the configuration (JkStatus ant task)

© OW2 Consortium 2008

New implementation of the discovery service

On top of JGroups Previous version ip multicast based (still available)

Advantages The protocol stack can be configured regarding the 

user environnement (jgroups­discovery.xml)• Eg. UDP stack for when multicast are not filtered 

and TCP stack otherwise

Page 22: JOnAS 5 and EasyBeans make clustering easy › ... › ClusteringJOnAS5.pdf · Jk/Tomcat 6 clustering Mod_jk Last, 1.2.26 Java Api for managing the configuration (JkStatus ant task)

© OW2 Consortium 2008

Monitoring the cluster daemon

DiscoveryStatistics on the machine (memory, os, proc, …)

Page 23: JOnAS 5 and EasyBeans make clustering easy › ... › ClusteringJOnAS5.pdf · Jk/Tomcat 6 clustering Mod_jk Last, 1.2.26 Java Api for managing the configuration (JkStatus ant task)

© OW2 Consortium 2008

Management of the cluster daemon

From jonasAdmin console• Add/remove a server

Page 24: JOnAS 5 and EasyBeans make clustering easy › ... › ClusteringJOnAS5.pdf · Jk/Tomcat 6 clustering Mod_jk Last, 1.2.26 Java Api for managing the configuration (JkStatus ant task)

© OW2 Consortium 2008

Monitoring graphics

Tracking statistics, counters and others monitoring indicators in graphics

Page 25: JOnAS 5 and EasyBeans make clustering easy › ... › ClusteringJOnAS5.pdf · Jk/Tomcat 6 clustering Mod_jk Last, 1.2.26 Java Api for managing the configuration (JkStatus ant task)

© OW2 Consortium 2008

Agenda

JOnAS 5.0 is available !

News in clustering Jk/Tomcat 6 Clustering CMI V2, a powerful clustering solution for EJB2/EJB3 Some enhancements in the cluster management

Next

Page 26: JOnAS 5 and EasyBeans make clustering easy › ... › ClusteringJOnAS5.pdf · Jk/Tomcat 6 clustering Mod_jk Last, 1.2.26 Java Api for managing the configuration (JkStatus ant task)

© OW2 Consortium 2008

Workplan

sampleCluster3Dynamic replicationCluster cache

Application level (Terracotta assessment)

Abstract layer for GCP (Unifor)Vertical Replication

Page 27: JOnAS 5 and EasyBeans make clustering easy › ... › ClusteringJOnAS5.pdf · Jk/Tomcat 6 clustering Mod_jk Last, 1.2.26 Java Api for managing the configuration (JkStatus ant task)

04/02/08 27© OW2 Consortium 2008

Vertical Replication

• Replica=AS+DB• AS cache enabled => high performance, scalable

Page 28: JOnAS 5 and EasyBeans make clustering easy › ... › ClusteringJOnAS5.pdf · Jk/Tomcat 6 clustering Mod_jk Last, 1.2.26 Java Api for managing the configuration (JkStatus ant task)

04/02/08 28© OW2 Consortium 2008