jonas 5 and easybeans make clustering easy › ... › clusteringjonas5.pdf · jk/tomcat 6...
TRANSCRIPT
© OW2 Consortium 2008
Introduction
Java EE clustering for Scalability High availability
Java EE cluster
Means Loadbalancing Replication Failover
© 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
4© OW2 Consortium 2008
JOnAS 5.0
© 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
© 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
© 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
© 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
© 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
© 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
© 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)
© OW2 Consortium 2008
Dynamic load-balancing parameters
2/2
J1
© 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
© OW2 Consortium 2008
Automatic switch cmi if available, otherwise jrmp
Cluster mode transparent for the client
© 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
© OW2 Consortium 2008
Deployment Descriptor (specific) ‘clusterpolicy’ element specifies the policy configuration file
name
‘clusterreplicated’ element specifies whether the SFSB must be replicated
Configuration file example (roundrobinpolicy.xml, located in the ejbjar 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>…
© 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
© 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
© OW2 Consortium 2008
Domain management
Server 2
Server 1
master Domain
JMX Rem
ote
© OW2 Consortium 2008
Log visualizationfrom jonasAdmin
Remote access through domain management
© 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 (jgroupsdiscovery.xml)• Eg. UDP stack for when multicast are not filtered
and TCP stack otherwise
© OW2 Consortium 2008
Monitoring the cluster daemon
DiscoveryStatistics on the machine (memory, os, proc, …)
© OW2 Consortium 2008
Management of the cluster daemon
From jonasAdmin console• Add/remove a server
© OW2 Consortium 2008
Monitoring graphics
Tracking statistics, counters and others monitoring indicators in graphics
© 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
© OW2 Consortium 2008
Workplan
sampleCluster3Dynamic replicationCluster cache
Application level (Terracotta assessment)
Abstract layer for GCP (Unifor)Vertical Replication
04/02/08 27© OW2 Consortium 2008
Vertical Replication
• Replica=AS+DB• AS cache enabled => high performance, scalable
04/02/08 28© OW2 Consortium 2008