Autoscaling Ws On Ec2 Apache Con Presentation


Published on

Published in: Technology
1 Like
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Autoscaling Ws On Ec2 Apache Con Presentation

  1. 1. Auto-scaling Axis2 Web Services on Amazon EC2 By Afkham Azeez ( WSO2 Inc.
  2. 2. <ul><li>The Problem </li></ul><ul><li>A Solution </li></ul><ul><li>Some Concepts </li></ul><ul><li>Design & Implementation Details </li></ul><ul><ul><li>Overview </li></ul></ul>
  3. 3. <ul><li>Fault tolerance, high availability & scalability are essential prerequisites for any enterprise application deployment </li></ul><ul><li>One of the major concerns is avoiding single points of failure </li></ul><ul><li>There is a high cost associated with achieving high availability & scalability </li></ul><ul><li>Need to achieve high availability & scalability at an optimum cost </li></ul><ul><ul><li>The Problem </li></ul></ul>
  4. 4. <ul><li>Traditional solution </li></ul><ul><ul><li>Buying safety-net capacity </li></ul></ul><ul><li>Better solution </li></ul><ul><ul><li>Scale-up the system when the load increases </li></ul></ul><ul><ul><li>Scale-down the system when the load decreases </li></ul></ul><ul><ul><li>Should not have idling nodes </li></ul></ul><ul><ul><li>Pay only for the actual computing power & bandwidth utilized </li></ul></ul><ul><ul><li>Solutions </li></ul></ul>
  5. 5. <ul><li>Building a framework which will auto-scale the number of Axis2 nodes on Amazon EC2, depending on the load </li></ul><ul><ul><li>Project Objective </li></ul></ul>
  6. 6. <ul><ul><li>Axis2 is a middleware platform which enables hosting of Web service applications and supports some of the major Web services standards </li></ul></ul><ul><ul><li>Can host Web services written in Java as well as various scripting languages </li></ul></ul><ul><ul><li>Can be deployed in a clustered configuration </li></ul></ul><ul><ul><li>Uses Apache Tribes for clustering </li></ul></ul><ul><ul><li>Axis2 clustering has been adopted to work on EC2 </li></ul></ul><ul><ul><li>Apache Axis2 </li></ul></ul>
  7. 7. <ul><ul><li>Apache Synapse is designed to be a simple, lightweight and high performance ESB </li></ul></ul><ul><ul><li>Supports load balancing with or without failover </li></ul></ul><ul><ul><li>Supports static & dynamic load balancing </li></ul></ul><ul><ul><li>Uses Apache Axis2 </li></ul></ul><ul><ul><li>Apache Synapse </li></ul></ul>
  8. 8. <ul><ul><li>A messaging framework with group communication abilities </li></ul></ul><ul><ul><li>Allows you to send and receive messages over a network, it also allows for dynamic discovery of other nodes in the network. </li></ul></ul><ul><ul><li>Used by Apache Tomcat & Apache Axis2 </li></ul></ul><ul><ul><li>Apache Tribes </li></ul></ul>
  9. 9. Deploying a Service on the Cloud AMI Instances
  10. 10. Deploying a Service on the Cloud
  11. 11. Deploying a Service on the Cloud
  12. 12. Deploying a Service on the Cloud Service is available now
  13. 13. Auto-scaling
  14. 14. Auto-scaling Load Increases
  15. 15. Auto-scaling Startup new instances
  16. 16. Auto-scaling New instances join group
  17. 17. Auto-scaling Load Decreases
  18. 18. Auto-scaling Terminate instances
  19. 19. Deployment Architecture
  20. 20. Membership Aware Dynamic Load Balancing
  21. 21. Membership Aware Dynamic Load Balancing
  22. 22. Membership Schemes <ul><li>Static </li></ul><ul><li>Dynamic </li></ul><ul><li>Hybrid (WKA based)‏ </li></ul>
  23. 23. WKA Based Membership (1/3)‏ Application member joins. The load balancer is also a well-known member
  24. 24. WKA Based Membership (2/3)‏ A non-WK load balancer joins
  25. 25. WKA Based Membership (3/3)‏ A well-known load balancer rejoins after crashing
  26. 26. Membership Channel Architecture
  27. 27. Initialization Channel Architecture
  28. 28. Synapse Configuration - axis2.xml
  29. 29. Synapse Configuration - synapse.xml
  30. 30. Synapse Configuration <ul><li>AutoscaleInMediator </li></ul><ul><li>AutoscaleOutMediator </li></ul><ul><li>Autoscale Task </li></ul>
  31. 31. Synapse Configuration Normal Flow
  32. 32. Synapse Configuration Fault Flow
  33. 33. Synapse Autoscale Task
  34. 34. Synapse Autoscale Task <ul><li>Sanity Check </li></ul><ul><li>Autoscaling </li></ul><ul><ul><li>Scale up </li></ul></ul><ul><ul><li>Scale down </li></ul></ul>
  35. 35. Booting up Start Start Start Start Initial Instance LB Group Axis2 App Group synapse.xml S3 Bucket Load configuration
  36. 36. Axis2 Configuration - axis2.xml
  37. 37. More Implementation Details <ul><li>Single AMI – autoscalews </li></ul><ul><li>Start </li></ul><ul><ul><li>ec2-run-instances ami-a03fdbc9 -k autoscale -f -g autoscale-lb </li></ul></ul><ul><li>Payload </li></ul><ul><ul><li>Extract params from payload </li></ul></ul><ul><ul><li>Env variables </li></ul></ul><ul><li>Axis2 & Synapse Configuration files & Repositories </li></ul><ul><ul><li>Maintained on S3 </li></ul></ul><ul><li>Fault Tolerance </li></ul><ul><ul><li>Monitoring cron job </li></ul></ul><ul><ul><li>Java Service Wrapper daemons </li></ul></ul><ul><ul><li>Future: Use monit </li></ul></ul><ul><ul><li>Future: Axis2/Synapse agent to check process status </li></ul></ul>
  38. 38. Axis2 Configuration & Repository Repo Conf Axis2 Instance S3 Bucket Load repo Load configuration
  39. 39. Questions Suggestions Improvements
  40. 40. Thank You