High-Availability, Fault Tolerance, and Resource Oriented Computing
High-Availability, Fault Tolerance, and Resource Oriented Computing
High-Availability, Fault Tolerance, and Resource Oriented Computing
High-Availability,
Fault Tolerance,
and Resource Oriented
Computing
This presentation is available from:
http://ciurana.eu/GeeCON-2010
Lets move the Java world!
About Eugene...
Very Important!
What is Scalability?
Horizontal Scalability
Load Balancer
Node
Node
Node
Scales
out
Load Balancer
Node
Node
Node
Node
Clustering!
Lets move the Java world!
Vertical Scalability
Virtual Node 3
Virtual Node 2
Virtual Node 2
Virtual Node 1
Virtual Node 1
Scales up
Virtual Node 0
Virtual Node 0
Dual Core
Single Processor
16 MB RAM
Dual Core
Dual Processor
32 MB RAM
What is Availability?
Downtime (minutes)
Downtime/year
Vendor jargon
90
52560.00
36.5 days
one nine
99
5256.00
3.7 days
two nines
99.9
526.60
8.8 hours
three nines
99.99
52.56
53 minutes
four nines
99.999
5.26
5.3 minutes
five nines
99.9999
0.53
32 seconds
six nines
SLAs are negotiated terms that outline the obligations of the two
parties delivering and using a system
System type - not all systems require the same SLA
Levels of availability
Minimum
Target
SLAs help
Uptime
determine if
Network
you scale up
Power
or out
Maintenance windows
Serviceability
Performance and metrics
Billing
Load Balancers
Load Balancers
Consumer
Rn
R = request
n = sequence number
Load Balancer
74.0.125.28
R1
Node
192.168.202.55
R3
Node
192.168.202.66
R2
Node
192.168.202.67
Node
192.168.202.69
Consumer
Consumer
Sticky Load
Balancer
74.0.125.28
Node
192.168.202.55
Node
192.168.202.66
Node
192.168.202.67
Node
192.168.202.69
Load Balancer
74.0.125.28
Node
192.168.202.55
Node
192.168.202.66
Node
192.168.202.67
Node
192.168.202.69
Session
Data
Caching Strategies
Application caching
Little or no programmer participation (e.g. Terracotta)
Explicit API calls (memcached, Coherence, etc.)
Web caching - stores full documents, or fragments
(particles) on the server or client and are invisible to
the client
Web accelerators - distribute the load (e.g. CDN like
S3, Akamai, etc.)
Proxy caches - distribute requests to same resources
and may provide filtering/query (e.g. Squid, Apache, ISA
servers)
query
update
Query?
Fetch
datum from
cache
Update
datum in
database
datum is
None
no
yes
Invalidate cache
Query
datum from
database
Add or update
datum to cache
Add datum to
cache
Use datum
in app
End
Distributed Caching
Consumer
Load Balancer
74.0.125.28
Node
192.168.202.55
Node
192.168.202.66
Node
192.168.202.67
Node
192.168.202.69
Cache 1
Cache 2
Cache 3
Database
Clustering
A/A Clustering
A/A == Active/Active
Distribute the load evenly among multiple nodes
All nodes offer the same capabilities
All nodes are active at the same time
Consumer
Load Balancer
74.0.125.28
Node
192.168.202.55
Node
192.168.202.66
Node
192.168.202.67
Node
192.168.202.69
A/P == Active/Passive
Provides uninterrupted service through redundant nodes
Eliminates single-point-of-failure
Two nodes minimum, and heartbeat detection
Automatic traffic switch for fail-over
Consumer
Router
74.0.125.28
Active Node
192.168.202.55
heartbeat
Failover Node
192.168.202.69
State Data
Cache
Database
Failover
Database
Grid
Consumer
Master
Load Balancer
Node
Node
Node
Node
Load Balancer
Node
Node
Node
Node
Process loads as
independent jobs
Nodes dont require data
sharing
Storage, network may be
shared by all nodes
Intermediate results have
no bearing on other jobs
progress
Each node is independent
Map/Reduce (Hadoop)
Computational Cluster
Master
Node
Node
Node
Node
Node
Node
Node
Node
Fault tolerance
results from
SLAs
Load Balancer
74.0.125.28
Replacement
Node
192.168.202.53
Node
192.168.202.55
Node
192.168.202.66
Node
192.168.202.67
Node
192.168.202.69
Router
74.0.125.28
Node
192.168.202.55
heartbeat
Failover Node
192.168.202.69
State Data
Cache
Database
Failover
Database
ROC Architecture
Web
browser
Service Object
Remedy
business logic
Web app
Internet
GUI
App
Dedicated API
JMS, SOAP, etc.
Transformer
Transformer
Mule ESB
Transformer
SOAP
JDBC
CRM
Product
Catalogue
HTTP, XML
Product
Product
Support
Product
Support
Pages
Support
Pages
Pages
TCP pass-through
Single Sign-On
LDAP, SOAP
Mainframe / RACF
Active
Directory
Legacy
Auth
USB
LeapFrog
Connect
Web
Browser
S3
Content
Repository
Third-party
Partner Site
Internet
www.leapfrog.com
connected
products
LearningPath
Firewall
Mule ESB backbone
HTTP, SOAP (CXF), REST, etc. routing, filtering, and dispatching; ActiveMQ JMS broker; dedicated LeapFrog services
Customer
Data
Game
play
Data
Servlets
App Logic
Device
Logs
Content
Management
System
REST, JCR
Crowd SSO
Content
Authoring
User
Credentials
Load Balancer
Application
Server
Tomcat 6
Application
Server
Tomcat 6
Services Proxy
Mule ESB
SOAP, REST
Mule ESB
SOAP, REST
Database
Mule ESB
1.6.2
Mule ESB
1.6.2
Mule ESB
servlet, MTOM
Mule ESB
servlet, MTOM
NFS
share
Mule ESB
1.6.2
ActiveMQ
ActiveMQ
NFS
share
http://server.mycompany.com/service_call
Load
Balancer
http://mule_server_1/service_call
http://mule_server_2/service_call
Service 1
Service 2
Service 3
Service 1
Service 2
Service 3
External Applications
http://server.mycompany.com/service_call
Load
Balancer
http://mule_server_1/service_call
http://mule_server_2/service_call
Service 1
Service 2
Service 3
Service 1
Service 2
Service 3
Load Balancer
time
Load Balancer
Load Balancer
Database Replication
Primary Cluster
Node 0
Node 1
Partition 0
Partition 1
DB 0
DB 1
DB 0b
DB 1b
Application Deployment
Load Balancer
Mule 1
Load Balancer
Mule 2
Mule 3
Mule 4
Mule 5
Failover
Application Deployment
This architecture has a lower cost of operation and simplifies power consumption and administration.
Application 1
Application 2
Web Service 1
Web Service 2
JBoss
MQ
Java 6
Java 6
Java 6
Linux
Linux
Linux
Virtual Machine
Virtual Machine
Virtual Machine
Simplify the architecture by having a common platform for all systems. This platform can be replicated across multiple data
centers.
* Virtual Machine: VMware or Xen hosted on Windows; consider Amazon EC2 as a viable, low-cost alternative
* Linux: Ubuntu Server
* PowerBuilder applications (end-user) migrate to JBoss + Wicket or a similar configuration
* All web services are hosted by Mule ESB
* The Mule ESB and JBoss servers are separate from one another
* MQ clusters have a similar architecture; JBoss messaging and Websphere MQ
* Java 6 as a minimum
Application Deployment
App and service requests
may come from the open Internet
Each data center will have a cluster of two or more physical systems.
Each system will virtually host two or more applications/
environments deployed as described in the previous diagram.
Internet
Use physical
load balancers;
can be Linux systems
or dedicated F5
balancers - separate from
cluseter
Services
Balancer
MQ
Master
Web Services
Active
Application
Active
MQ
Slave
Distributed
Cache
Application
Active
Web Services
Active
Disk
Disk
SAN
Distributed
Cache
Application Deployment
Data Center Japan
Data Center Europe
App Cluster
App Cluster
Internet
App Cluster
App Cluster
Expert
Claims Mgmt
Data Center US
App Cluster
App Cluster
Claims Mgmt
Informix
Legacy System
Legacy System
Legacy System
Application Deployment
Primary Cluster
Node 0
Secondary Cluster
Node 1
Node 0
Node 1
Partition 0
Partition 1
Partition 0
Partition 1
DB 0
DB 1
DB 0
DB 1
DB 0b
DB 1b
DB 0b
DB 1b
Eugene Ciurana
http://ciurana.eu/scalablesystems
Q&A
Comments?
Anything else?
This presentation is available from:
http://ciurana.eu/GeeCON-2010
Twitter: ciurana
Lets move the Java world!