auto-scaling axis2 web services on amazon ec2 by afkham azeez
DESCRIPTION
Auto-scaling Axis2 Web Services on Amazon EC2 By Afkham Azeez. The Problem A Solution Some Concepts Design & Implementation Details. Overview. Fault tolerance, high availability & scalability are essential prerequisites for any enterprise application deployment - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Auto-scaling Axis2 Web Services on Amazon EC2 By Afkham Azeez](https://reader038.vdocuments.us/reader038/viewer/2022110102/56813391550346895d9a9fdb/html5/thumbnails/1.jpg)
Auto-scaling Axis2 Web Services on
Amazon EC2
ByAfkham Azeez
![Page 2: Auto-scaling Axis2 Web Services on Amazon EC2 By Afkham Azeez](https://reader038.vdocuments.us/reader038/viewer/2022110102/56813391550346895d9a9fdb/html5/thumbnails/2.jpg)
2
Overview
• The Problem
• A Solution
• Some Concepts
• Design & Implementation Details
![Page 3: Auto-scaling Axis2 Web Services on Amazon EC2 By Afkham Azeez](https://reader038.vdocuments.us/reader038/viewer/2022110102/56813391550346895d9a9fdb/html5/thumbnails/3.jpg)
3
The Problem
• Fault tolerance, high availability & scalability are essential prerequisites for any enterprise application deployment
• One of the major concerns is avoiding single points of failure
• There is a high cost associated with achieving high availability & scalability.
![Page 4: Auto-scaling Axis2 Web Services on Amazon EC2 By Afkham Azeez](https://reader038.vdocuments.us/reader038/viewer/2022110102/56813391550346895d9a9fdb/html5/thumbnails/4.jpg)
4
Solutions
• Traditional solution
– Buying safety-net capacity
• Better solution
– Scale-up the system when the load increases
– Scale-down the system when the load decreases
– Should not have idling nodes
– Virtualization
– Pay only for the actual computing power & bandwidth utilized
![Page 5: Auto-scaling Axis2 Web Services on Amazon EC2 By Afkham Azeez](https://reader038.vdocuments.us/reader038/viewer/2022110102/56813391550346895d9a9fdb/html5/thumbnails/5.jpg)
5
Project Objective
• Building a framework which will auto-scale the number of Axis2 nodes on Amazon EC2, depending on the load
• This is a PoC Project
![Page 6: Auto-scaling Axis2 Web Services on Amazon EC2 By Afkham Azeez](https://reader038.vdocuments.us/reader038/viewer/2022110102/56813391550346895d9a9fdb/html5/thumbnails/6.jpg)
6
Amazon EC2
Amazon EC2 provides resizable compute capacity in the cloud
Provides a simple Web service interface & tooling that allows one to obtain and configure capacity with ease & to build failure resilient applications
![Page 7: Auto-scaling Axis2 Web Services on Amazon EC2 By Afkham Azeez](https://reader038.vdocuments.us/reader038/viewer/2022110102/56813391550346895d9a9fdb/html5/thumbnails/7.jpg)
7
Apache Axis2
Axis2 is a middleware platform which enables hosting of Web service applications and supports some of the major Web services standards
Can host Web services written in Java as well as various scripting languages
Can be deployed in a clustered configuration Uses Apache Tribes for clustering Axis2 clustering can be adopted to work on EC2
![Page 8: Auto-scaling Axis2 Web Services on Amazon EC2 By Afkham Azeez](https://reader038.vdocuments.us/reader038/viewer/2022110102/56813391550346895d9a9fdb/html5/thumbnails/8.jpg)
8
Apache Synapse
Apache Synapse is designed to be a simple, lightweight and high performance ESB
Supports load balancing with or without failover Supports static & dynamic load balancing Uses Apache Axis2
![Page 9: Auto-scaling Axis2 Web Services on Amazon EC2 By Afkham Azeez](https://reader038.vdocuments.us/reader038/viewer/2022110102/56813391550346895d9a9fdb/html5/thumbnails/9.jpg)
9
Apache Tribes
A messaging framework with group communication abilities
Allows you to send and receive messages over a network, it also allows for dynamic discovery of other nodes in the network.
Used by Apache Tomcat & Apache Axis2
![Page 10: Auto-scaling Axis2 Web Services on Amazon EC2 By Afkham Azeez](https://reader038.vdocuments.us/reader038/viewer/2022110102/56813391550346895d9a9fdb/html5/thumbnails/10.jpg)
10
Deploying a Service on the Cloud
AMI Instances
![Page 11: Auto-scaling Axis2 Web Services on Amazon EC2 By Afkham Azeez](https://reader038.vdocuments.us/reader038/viewer/2022110102/56813391550346895d9a9fdb/html5/thumbnails/11.jpg)
11
Deploying a Service on the Cloud
![Page 12: Auto-scaling Axis2 Web Services on Amazon EC2 By Afkham Azeez](https://reader038.vdocuments.us/reader038/viewer/2022110102/56813391550346895d9a9fdb/html5/thumbnails/12.jpg)
12
Deploying a Service on the Cloud
![Page 13: Auto-scaling Axis2 Web Services on Amazon EC2 By Afkham Azeez](https://reader038.vdocuments.us/reader038/viewer/2022110102/56813391550346895d9a9fdb/html5/thumbnails/13.jpg)
13
Deploying a Service on the Cloud
Service is available now
![Page 14: Auto-scaling Axis2 Web Services on Amazon EC2 By Afkham Azeez](https://reader038.vdocuments.us/reader038/viewer/2022110102/56813391550346895d9a9fdb/html5/thumbnails/14.jpg)
14
Auto-scaling
![Page 15: Auto-scaling Axis2 Web Services on Amazon EC2 By Afkham Azeez](https://reader038.vdocuments.us/reader038/viewer/2022110102/56813391550346895d9a9fdb/html5/thumbnails/15.jpg)
15
Auto-scaling
Load Increases
![Page 16: Auto-scaling Axis2 Web Services on Amazon EC2 By Afkham Azeez](https://reader038.vdocuments.us/reader038/viewer/2022110102/56813391550346895d9a9fdb/html5/thumbnails/16.jpg)
16
Auto-scaling
Startup new instances
![Page 17: Auto-scaling Axis2 Web Services on Amazon EC2 By Afkham Azeez](https://reader038.vdocuments.us/reader038/viewer/2022110102/56813391550346895d9a9fdb/html5/thumbnails/17.jpg)
17
Auto-scaling
New instances join group
![Page 18: Auto-scaling Axis2 Web Services on Amazon EC2 By Afkham Azeez](https://reader038.vdocuments.us/reader038/viewer/2022110102/56813391550346895d9a9fdb/html5/thumbnails/18.jpg)
18
Auto-scaling
Load Decreases
![Page 19: Auto-scaling Axis2 Web Services on Amazon EC2 By Afkham Azeez](https://reader038.vdocuments.us/reader038/viewer/2022110102/56813391550346895d9a9fdb/html5/thumbnails/19.jpg)
19
Auto-scaling
Terminate instances
![Page 20: Auto-scaling Axis2 Web Services on Amazon EC2 By Afkham Azeez](https://reader038.vdocuments.us/reader038/viewer/2022110102/56813391550346895d9a9fdb/html5/thumbnails/20.jpg)
20
Auto-scaling
Terminate instances
![Page 21: Auto-scaling Axis2 Web Services on Amazon EC2 By Afkham Azeez](https://reader038.vdocuments.us/reader038/viewer/2022110102/56813391550346895d9a9fdb/html5/thumbnails/21.jpg)
21
Deployment Architecture
![Page 22: Auto-scaling Axis2 Web Services on Amazon EC2 By Afkham Azeez](https://reader038.vdocuments.us/reader038/viewer/2022110102/56813391550346895d9a9fdb/html5/thumbnails/22.jpg)
22
Membership Aware Dynamic Load Balancing (1/2)
![Page 23: Auto-scaling Axis2 Web Services on Amazon EC2 By Afkham Azeez](https://reader038.vdocuments.us/reader038/viewer/2022110102/56813391550346895d9a9fdb/html5/thumbnails/23.jpg)
23
Membership Aware Dynamic Load Balancing (2/2)
![Page 24: Auto-scaling Axis2 Web Services on Amazon EC2 By Afkham Azeez](https://reader038.vdocuments.us/reader038/viewer/2022110102/56813391550346895d9a9fdb/html5/thumbnails/24.jpg)
24
Membership Schemes
Static Dynamic Hybrid (WKA based)
![Page 25: Auto-scaling Axis2 Web Services on Amazon EC2 By Afkham Azeez](https://reader038.vdocuments.us/reader038/viewer/2022110102/56813391550346895d9a9fdb/html5/thumbnails/25.jpg)
25
WKA Based Membership (1/3)
Application member joins. The load balancer is also a well-known member
![Page 26: Auto-scaling Axis2 Web Services on Amazon EC2 By Afkham Azeez](https://reader038.vdocuments.us/reader038/viewer/2022110102/56813391550346895d9a9fdb/html5/thumbnails/26.jpg)
26
WKA Based Membership (2/3)
A non-WK load balancer joins
![Page 27: Auto-scaling Axis2 Web Services on Amazon EC2 By Afkham Azeez](https://reader038.vdocuments.us/reader038/viewer/2022110102/56813391550346895d9a9fdb/html5/thumbnails/27.jpg)
27
WKA Based Membership (3/3)
A well-known load balancer rejoins after crashing
![Page 28: Auto-scaling Axis2 Web Services on Amazon EC2 By Afkham Azeez](https://reader038.vdocuments.us/reader038/viewer/2022110102/56813391550346895d9a9fdb/html5/thumbnails/28.jpg)
28
Membership Channel Architecture
![Page 29: Auto-scaling Axis2 Web Services on Amazon EC2 By Afkham Azeez](https://reader038.vdocuments.us/reader038/viewer/2022110102/56813391550346895d9a9fdb/html5/thumbnails/29.jpg)
29
Initialization Channel Architecture
![Page 30: Auto-scaling Axis2 Web Services on Amazon EC2 By Afkham Azeez](https://reader038.vdocuments.us/reader038/viewer/2022110102/56813391550346895d9a9fdb/html5/thumbnails/30.jpg)
30
Synapse Configuration - axis2.xml
![Page 31: Auto-scaling Axis2 Web Services on Amazon EC2 By Afkham Azeez](https://reader038.vdocuments.us/reader038/viewer/2022110102/56813391550346895d9a9fdb/html5/thumbnails/31.jpg)
31
Synapse Configuration - synapse.xml
![Page 32: Auto-scaling Axis2 Web Services on Amazon EC2 By Afkham Azeez](https://reader038.vdocuments.us/reader038/viewer/2022110102/56813391550346895d9a9fdb/html5/thumbnails/32.jpg)
32
Synapse Configuration
• AutoscaleInMediator
• AutoscaleOutMediator
• Autoscale Task
![Page 33: Auto-scaling Axis2 Web Services on Amazon EC2 By Afkham Azeez](https://reader038.vdocuments.us/reader038/viewer/2022110102/56813391550346895d9a9fdb/html5/thumbnails/33.jpg)
33
Synapse Configuration
AutoscaleInMediator
AutoscaleOutMediator
MessageID List LoadAnalyzerTask
SendMediator DynamicLoadbalanceEndpoint
SendMediator
EC2 Client
SynapseSynapse
From client
To client
To Axis2
From Axis2
To EC2 WS
Get length Invoke
IN
OUT
Normal Flow
![Page 34: Auto-scaling Axis2 Web Services on Amazon EC2 By Afkham Azeez](https://reader038.vdocuments.us/reader038/viewer/2022110102/56813391550346895d9a9fdb/html5/thumbnails/34.jpg)
34
Synapse Configuration
AutoscaleInMediator
AutoscaleOutMediator
MessageID ListLoadAnalyzer
Task
SendMediator DynamicLoadbalanceEndpoint
MakeFaultMediator
EC2 Client
SynapseSynapse
From client
Toclient
To Axis2
From Axis2
To EC2 WS
Get length Invoke
IN
ErrorHandlerSendMediator
Fault Flow
![Page 35: Auto-scaling Axis2 Web Services on Amazon EC2 By Afkham Azeez](https://reader038.vdocuments.us/reader038/viewer/2022110102/56813391550346895d9a9fdb/html5/thumbnails/35.jpg)
35
Synapse Autoscale Task
![Page 36: Auto-scaling Axis2 Web Services on Amazon EC2 By Afkham Azeez](https://reader038.vdocuments.us/reader038/viewer/2022110102/56813391550346895d9a9fdb/html5/thumbnails/36.jpg)
36
Axis2 Configuration - axis2.xml
![Page 37: Auto-scaling Axis2 Web Services on Amazon EC2 By Afkham Azeez](https://reader038.vdocuments.us/reader038/viewer/2022110102/56813391550346895d9a9fdb/html5/thumbnails/37.jpg)
37
Synapse Autoscale Task
• Sanity Check
• Autoscaling– Scale up– Scale down
![Page 38: Auto-scaling Axis2 Web Services on Amazon EC2 By Afkham Azeez](https://reader038.vdocuments.us/reader038/viewer/2022110102/56813391550346895d9a9fdb/html5/thumbnails/38.jpg)
38
Implementation Details• Single AMI – autoscalews
• Start– ec2-run-instances ami-a03fdbc9 -k autoscale -f payload.zip -g
autoscale-lb
• Payload
– Extract params from payload
– Env variables
• Axis2 & Synapse Configuration files & Repositories
– Maintained on S3
• Fault Tolerance
– Monitoring cron job
– Java Service Wrapper daemons
– Future: Use monit
– Future: Axis2/Synapse agent to check process status
![Page 39: Auto-scaling Axis2 Web Services on Amazon EC2 By Afkham Azeez](https://reader038.vdocuments.us/reader038/viewer/2022110102/56813391550346895d9a9fdb/html5/thumbnails/39.jpg)
39
Implementation Details
Start
Start
Start
StartInitial Instance
LB Group Axis2 App Group
synapse.xml
S3 Bucket
Load configuration
![Page 40: Auto-scaling Axis2 Web Services on Amazon EC2 By Afkham Azeez](https://reader038.vdocuments.us/reader038/viewer/2022110102/56813391550346895d9a9fdb/html5/thumbnails/40.jpg)
40
Implementation Details
Repo
Conf
Axis2 Instance
S3 Bucket
Load repo
Load configuration
![Page 41: Auto-scaling Axis2 Web Services on Amazon EC2 By Afkham Azeez](https://reader038.vdocuments.us/reader038/viewer/2022110102/56813391550346895d9a9fdb/html5/thumbnails/41.jpg)
41
TODO
RightScale comparison
Google App Engine comparison
Eucalyptus AppScale
Perf figures
![Page 42: Auto-scaling Axis2 Web Services on Amazon EC2 By Afkham Azeez](https://reader038.vdocuments.us/reader038/viewer/2022110102/56813391550346895d9a9fdb/html5/thumbnails/42.jpg)
42
Questions
Suggestions
Improvements
![Page 43: Auto-scaling Axis2 Web Services on Amazon EC2 By Afkham Azeez](https://reader038.vdocuments.us/reader038/viewer/2022110102/56813391550346895d9a9fdb/html5/thumbnails/43.jpg)
43
Thank You