Autoscaling Ws On Ec2 Apache Con Presentation

Embed Size (px)

Citation preview

  • 1. Auto-scaling Axis2 Web ServicesonAmazon EC2 By Afkham Azeez ([email protected]) WSO2 Inc.

2.

  • The Problem
  • A Solution
  • Some Concepts
  • Design & Implementation Details
    • Overview

3.

  • Fault tolerance, high availability & scalability areessential prerequisites for any enterprise applicationdeployment
  • One of the major concerns is avoiding single points offailure
  • There is a high cost associated with achieving highavailability & scalability
  • Need to achieve high availability & scalability atanoptimum cost
    • The Problem

4.

  • 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
    • Pay only for the actual computing power &bandwidth utilized
    • Solutions

5.

  • Building a framework which will auto-scale thenumber of Axis2 nodes on Amazon EC2,depending on the load
    • Project Objective

6.

    • Axis2 is a middleware platform which enableshosting of Web service applications and supportssome of the major Web services standards
    • Can host Web services written in Java as well asvarious scripting languages
    • Can be deployed in a clustered configuration
    • Uses Apache Tribes for clustering
    • Axis2 clustering has been adopted to work on EC2
    • Apache Axis2

7.

    • 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
    • Apache Synapse

8.

    • A messaging framework with group communicationabilities
    • Allows you to send and receive messages over anetwork, it also allows for dynamic discovery ofother nodes in the network.
    • Used by Apache Tomcat & Apache Axis2
    • Apache Tribes

9. Deploying a Service on the Cloud AMI Instances 10. Deploying a Service on the Cloud 11. Deploying a Service on the Cloud 12. Deploying a Service on the Cloud Service is available now 13. Auto-scaling 14. Auto-scaling Load Increases 15. Auto-scaling Startup new instances 16. Auto-scaling New instances join group 17. Auto-scaling Load Decreases 18. Auto-scaling Terminate instances 19. Deployment Architecture 20. Membership Aware DynamicLoad Balancing 21. Membership Aware DynamicLoad Balancing 22. Membership Schemes

  • Static
  • Dynamic
  • Hybrid (WKA based)

23. WKA Based Membership (1/3) Application member joins. The load balancer is also a well-known member 24. WKA Based Membership (2/3) A non-WK load balancer joins 25. WKA Based Membership (3/3) A well-known load balancer rejoins after crashing 26. Membership Channel Architecture 27. Initialization Channel Architecture 28. Synapse Configuration - axis2.xml 29. Synapse Configuration - synapse.xml 30. Synapse Configuration

  • AutoscaleInMediator
  • AutoscaleOutMediator
  • Autoscale Task

31. Synapse ConfigurationNormal Flow 32. Synapse ConfigurationFault Flow 33. Synapse Autoscale Task 34. Synapse Autoscale Task

  • Sanity Check
  • Autoscaling
    • Scale up
    • Scale down

35. Booting up Start Start Start Start Initial Instance LB Group Axis2 App Group synapse.xml S3 Bucket Load configuration 36. Axis2 Configuration - axis2.xml 37. More Implementation Details

  • Single AMI autoscalews
  • Start
    • ec2-run-instances ami-a03fdbc9 -k autoscale -f payload.zip -gautoscale-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

38. Axis2 Configuration & Repository Repo Conf Axis2 Instance S3 Bucket Load repo Load configuration 39. Questions Suggestions Improvements 40. Thank You