SlideShare une entreprise Scribd logo
1  sur  28
Télécharger pour lire hors ligne
Achieving Scalability and
   High Availability for
 clustered Web Services
 using Apache Synapse

 Ruwan Linton [ruwan@apache.org]
            WSO2 Inc.
Contents
• Introduction
  – Apache Synapse
  – Web services clustering
  – Scalability/Availability in general
• Configuration
  – Proxy Service
  – Load balance and Fail over endpoints
Contents (Cntd..)
• Architecture
  –   Stateless load balancing
  –   State full load balancing
  –   Load balancing with fail over
  –   Dynamic load balancing
• Deployment
Apache Synapse
• Open source ESB providing mediation
• Configurable via an XML info set
• Lightweight, asynchronous core with
  streaming in the HTTP/S transports
• Extensible with scripts, or Java
• Can act as a front server for the web
  service infrastructure with load balancing,
  fail over and various mediation capabilities
Synapse operational
         models
• Virtual Service (Proxy service) model
• Message mediation model
• Scheduled work
• Event driven architecture (Event broker)
Virtual Services
Web services clustering
• Different servers
  providing the same
  service
• Group
  communication
  within the servers
• Shared resources
  for the cluster
Scalability


  Ability to either handle growing
amounts of work in a graceful manner,
     or to be readily enlarged
Availability


     The degree to which a system,
 subsystem, or equipment is operable
and in a committable state at the start
of a mission, when the mission is called
           for at an unknown
Synapse Configuration
• Configure a proxy service as the virtual
  service for the cluster of services
  – wrapped with a <proxy> element
  – declare an incoming/outgoing mediation
  – declare the endpoint
  – configure any quality of service
    improvements
Sample proxy

<proxy name=”foo”>
 <target inSequence=”ref-seq”>
   <endpoint>
     <address uri=”http://host/service”/>
   </endpoint>
 <target>
</proxy>
Synapse Config (Cntd..)
• Endpoint configuration of the proxy
  – 5 types with 3 primitive and 2 secondary
  – wrapped with an <endpoint> element
  – declare the actual endpoint properties
  – and any optimizations
Sample LB endpoint
<endpoint name=”test-lb”>
  <session type=”soap”/>
  <loadbalance policy=”roundRobin”>
     <endpoint ..../>
      ..
      ..
  </loadbalance>
</endpoint>
Architecture
• Stateless load balancing
  – LB algorithm implementation is
    pluggable
  – Built in round robin algorithm
  – Weighted LB algorithm
State full session aware
       load balancing
• Transport and SOAP session
• Client initiated vs Server initiated
Fail over with LB
LB and FO groups
Dynamic LB
Dynamic LB (Cntd..)
Scalability of Synapse
• Can handle 2500 concurrent connections
• Can handle 30M transactions per day
  – assumption: one transaction is one request
    for Synapse
• Non-blocking HTTP/S transport with
  message queuing with a configurable
  thread pools
• Different thread pool at the application
  layer and the I/O layer
Availability of Synapse
• Availability can be achieved with the
  deployment
  – Two passive nodes with a given active node
    in vertically
• Graceful shutdown and maintenance mode
  – Shutdown the listeners
  – Let the senders send out the responses after
    processing the already accepted messages
  – Shutdown the senders and the server or
    upgrade and restart the listener manager
• Round robin restart of the cluster in active
  active deployment
Deployment diagram
Analogy
• Isn't it just shifting the scalability and
  availability to synapse layer?
   – Yes it is... but if you look at the availability
     and scalability of a typical web service
     hosting environment and synapse with the
     non blocking HTTP/S it is much scalable and
     available than the service hosting
     environment
   – Fail over and Load balancing ability of
     synapse increases the availability and
     scalability of web services in the cluster
Analogy (Cntd..)
• Once you have the auto scaling
  implemented the dynamic load balancing
  functionality fits with this nicely to
  achieve the scalability into great extent
• You get many other features with
  Synapse as the load balancer like session
  aware load balancing at the SOAP session
More..
• Throttling and caching at the
  Synapse layer
  – Concurrency throttling handles the
    scalability gracefully by rejecting the
    messages
  – Caching improves the availability
• Fault tolerance through a fault
  handling mechanism
Summary
• Synapse load balancing and fail over
  routing can be used to achieve high
  availability of the web services
• Synapse is scalable with the non locking
  transport and streaming
• Session aware load balancing on SOAP
  message is an added advantage of using
  synapse
• Availability of the web services can be
  achieved with the the correct deployment
  with synapse
Thank You!



 Questions??

Contenu connexe

Tendances

Enterprise Messaging with Apache ActiveMQ
Enterprise Messaging with Apache ActiveMQEnterprise Messaging with Apache ActiveMQ
Enterprise Messaging with Apache ActiveMQ
elliando dias
 
Php day 2011 - Zing me configuration system arch
Php day 2011 - Zing me configuration system archPhp day 2011 - Zing me configuration system arch
Php day 2011 - Zing me configuration system arch
Quang Anh Le
 

Tendances (20)

XMPP & AMQP in Ruby
XMPP & AMQP in RubyXMPP & AMQP in Ruby
XMPP & AMQP in Ruby
 
Enterprise Messaging with Apache ActiveMQ
Enterprise Messaging with Apache ActiveMQEnterprise Messaging with Apache ActiveMQ
Enterprise Messaging with Apache ActiveMQ
 
Quality of service
Quality of serviceQuality of service
Quality of service
 
Better performances with HTTP/2
Better performances with HTTP/2Better performances with HTTP/2
Better performances with HTTP/2
 
SPDY, TCP, and the Single Connection Throttle
SPDY, TCP, and the Single Connection ThrottleSPDY, TCP, and the Single Connection Throttle
SPDY, TCP, and the Single Connection Throttle
 
Optimiszing proxy
Optimiszing proxyOptimiszing proxy
Optimiszing proxy
 
Function Mesh for Apache Pulsar, the Way for Simple Streaming Solutions
Function Mesh for Apache Pulsar, the Way for Simple Streaming SolutionsFunction Mesh for Apache Pulsar, the Way for Simple Streaming Solutions
Function Mesh for Apache Pulsar, the Way for Simple Streaming Solutions
 
Optimizing proxy
Optimizing proxyOptimizing proxy
Optimizing proxy
 
Making communications across boundaries simple with NServiceBus
Making communications across boundaries simple with NServiceBusMaking communications across boundaries simple with NServiceBus
Making communications across boundaries simple with NServiceBus
 
Asynchronous AMQP
Asynchronous AMQPAsynchronous AMQP
Asynchronous AMQP
 
Using Apache Pulsar as a Modern, Scalable, High Performing JMS Platform - Pus...
Using Apache Pulsar as a Modern, Scalable, High Performing JMS Platform - Pus...Using Apache Pulsar as a Modern, Scalable, High Performing JMS Platform - Pus...
Using Apache Pulsar as a Modern, Scalable, High Performing JMS Platform - Pus...
 
Quality of Service
Quality  of  ServiceQuality  of  Service
Quality of Service
 
Optimiszing proxy
Optimiszing proxyOptimiszing proxy
Optimiszing proxy
 
Modern Distributed Messaging and RPC
Modern Distributed Messaging and RPCModern Distributed Messaging and RPC
Modern Distributed Messaging and RPC
 
Php day 2011 - Zing me configuration system arch
Php day 2011 - Zing me configuration system archPhp day 2011 - Zing me configuration system arch
Php day 2011 - Zing me configuration system arch
 
Load balancing
Load balancingLoad balancing
Load balancing
 
Load Balancing Server
Load Balancing ServerLoad Balancing Server
Load Balancing Server
 
Работаем с RabbitMQ в Python используя kombu + gevent. (Rinat khabibiev)
Работаем с RabbitMQ в Python используя kombu + gevent. (Rinat khabibiev)Работаем с RabbitMQ в Python используя kombu + gevent. (Rinat khabibiev)
Работаем с RabbitMQ в Python используя kombu + gevent. (Rinat khabibiev)
 
Message Broker System and RabbitMQ
Message Broker System and RabbitMQMessage Broker System and RabbitMQ
Message Broker System and RabbitMQ
 
Introduction to Apache ActiveMQ Artemis
Introduction to Apache ActiveMQ ArtemisIntroduction to Apache ActiveMQ Artemis
Introduction to Apache ActiveMQ Artemis
 

Similaire à Aceu2009 Synapse Scalability Availability

Global WAN Level Clustering
Global WAN Level ClusteringGlobal WAN Level Clustering
Global WAN Level Clustering
Sunil Srivastava
 
Operating Kafka on AutoPilot mode @ DBS Bank (Arpit Dubey, DBS Bank) Kafka Su...
Operating Kafka on AutoPilot mode @ DBS Bank (Arpit Dubey, DBS Bank) Kafka Su...Operating Kafka on AutoPilot mode @ DBS Bank (Arpit Dubey, DBS Bank) Kafka Su...
Operating Kafka on AutoPilot mode @ DBS Bank (Arpit Dubey, DBS Bank) Kafka Su...
confluent
 

Similaire à Aceu2009 Synapse Scalability Availability (20)

Creating Connector to Bridge the Worlds of Kafka and gRPC at Wework (Anoop Di...
Creating Connector to Bridge the Worlds of Kafka and gRPC at Wework (Anoop Di...Creating Connector to Bridge the Worlds of Kafka and gRPC at Wework (Anoop Di...
Creating Connector to Bridge the Worlds of Kafka and gRPC at Wework (Anoop Di...
 
Server Farms and XML Web Services
Server Farms and XML Web ServicesServer Farms and XML Web Services
Server Farms and XML Web Services
 
Network Automation with Salt and NAPALM: Introuction
Network Automation with Salt and NAPALM: IntrouctionNetwork Automation with Salt and NAPALM: Introuction
Network Automation with Salt and NAPALM: Introuction
 
Microservices with NGINX pdf
Microservices with NGINX pdfMicroservices with NGINX pdf
Microservices with NGINX pdf
 
Capistrano
CapistranoCapistrano
Capistrano
 
Introduction to LAVA Workload Scheduler
Introduction to LAVA Workload SchedulerIntroduction to LAVA Workload Scheduler
Introduction to LAVA Workload Scheduler
 
WebSocket MicroService vs. REST Microservice
WebSocket MicroService vs. REST MicroserviceWebSocket MicroService vs. REST Microservice
WebSocket MicroService vs. REST Microservice
 
Webapplication Load Balancing
Webapplication Load BalancingWebapplication Load Balancing
Webapplication Load Balancing
 
#lspe: Dynamic Scaling
#lspe: Dynamic Scaling #lspe: Dynamic Scaling
#lspe: Dynamic Scaling
 
Global WAN Level Clustering
Global WAN Level ClusteringGlobal WAN Level Clustering
Global WAN Level Clustering
 
ACE - Comcore
ACE - ComcoreACE - Comcore
ACE - Comcore
 
Event Streaming Architectures with Confluent and ScyllaDB
Event Streaming Architectures with Confluent and ScyllaDBEvent Streaming Architectures with Confluent and ScyllaDB
Event Streaming Architectures with Confluent and ScyllaDB
 
HA System-First presentation
HA System-First presentationHA System-First presentation
HA System-First presentation
 
Load Balancing for Containers and Cloud Native Architecture
Load Balancing for Containers and Cloud Native ArchitectureLoad Balancing for Containers and Cloud Native Architecture
Load Balancing for Containers and Cloud Native Architecture
 
Advanced Container Management and Scheduling
Advanced Container Management and SchedulingAdvanced Container Management and Scheduling
Advanced Container Management and Scheduling
 
Distributed Performance testing by funkload
Distributed Performance testing by funkloadDistributed Performance testing by funkload
Distributed Performance testing by funkload
 
Building and Scaling a WebSockets Pubsub System
Building and Scaling a WebSockets Pubsub SystemBuilding and Scaling a WebSockets Pubsub System
Building and Scaling a WebSockets Pubsub System
 
Weblogic cluster
Weblogic clusterWeblogic cluster
Weblogic cluster
 
Weblogic cluster
Weblogic clusterWeblogic cluster
Weblogic cluster
 
Operating Kafka on AutoPilot mode @ DBS Bank (Arpit Dubey, DBS Bank) Kafka Su...
Operating Kafka on AutoPilot mode @ DBS Bank (Arpit Dubey, DBS Bank) Kafka Su...Operating Kafka on AutoPilot mode @ DBS Bank (Arpit Dubey, DBS Bank) Kafka Su...
Operating Kafka on AutoPilot mode @ DBS Bank (Arpit Dubey, DBS Bank) Kafka Su...
 

Dernier

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

Dernier (20)

Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 

Aceu2009 Synapse Scalability Availability

  • 1. Achieving Scalability and High Availability for clustered Web Services using Apache Synapse Ruwan Linton [ruwan@apache.org] WSO2 Inc.
  • 2. Contents • Introduction – Apache Synapse – Web services clustering – Scalability/Availability in general • Configuration – Proxy Service – Load balance and Fail over endpoints
  • 3. Contents (Cntd..) • Architecture – Stateless load balancing – State full load balancing – Load balancing with fail over – Dynamic load balancing • Deployment
  • 4. Apache Synapse • Open source ESB providing mediation • Configurable via an XML info set • Lightweight, asynchronous core with streaming in the HTTP/S transports • Extensible with scripts, or Java • Can act as a front server for the web service infrastructure with load balancing, fail over and various mediation capabilities
  • 5.
  • 6. Synapse operational models • Virtual Service (Proxy service) model • Message mediation model • Scheduled work • Event driven architecture (Event broker)
  • 8. Web services clustering • Different servers providing the same service • Group communication within the servers • Shared resources for the cluster
  • 9. Scalability Ability to either handle growing amounts of work in a graceful manner, or to be readily enlarged
  • 10. Availability The degree to which a system, subsystem, or equipment is operable and in a committable state at the start of a mission, when the mission is called for at an unknown
  • 11. Synapse Configuration • Configure a proxy service as the virtual service for the cluster of services – wrapped with a <proxy> element – declare an incoming/outgoing mediation – declare the endpoint – configure any quality of service improvements
  • 12. Sample proxy <proxy name=”foo”> <target inSequence=”ref-seq”> <endpoint> <address uri=”http://host/service”/> </endpoint> <target> </proxy>
  • 13. Synapse Config (Cntd..) • Endpoint configuration of the proxy – 5 types with 3 primitive and 2 secondary – wrapped with an <endpoint> element – declare the actual endpoint properties – and any optimizations
  • 14. Sample LB endpoint <endpoint name=”test-lb”> <session type=”soap”/> <loadbalance policy=”roundRobin”> <endpoint ..../> .. .. </loadbalance> </endpoint>
  • 15. Architecture • Stateless load balancing – LB algorithm implementation is pluggable – Built in round robin algorithm – Weighted LB algorithm
  • 16. State full session aware load balancing • Transport and SOAP session • Client initiated vs Server initiated
  • 18. LB and FO groups
  • 21. Scalability of Synapse • Can handle 2500 concurrent connections • Can handle 30M transactions per day – assumption: one transaction is one request for Synapse • Non-blocking HTTP/S transport with message queuing with a configurable thread pools • Different thread pool at the application layer and the I/O layer
  • 22. Availability of Synapse • Availability can be achieved with the deployment – Two passive nodes with a given active node in vertically • Graceful shutdown and maintenance mode – Shutdown the listeners – Let the senders send out the responses after processing the already accepted messages – Shutdown the senders and the server or upgrade and restart the listener manager • Round robin restart of the cluster in active active deployment
  • 24. Analogy • Isn't it just shifting the scalability and availability to synapse layer? – Yes it is... but if you look at the availability and scalability of a typical web service hosting environment and synapse with the non blocking HTTP/S it is much scalable and available than the service hosting environment – Fail over and Load balancing ability of synapse increases the availability and scalability of web services in the cluster
  • 25. Analogy (Cntd..) • Once you have the auto scaling implemented the dynamic load balancing functionality fits with this nicely to achieve the scalability into great extent • You get many other features with Synapse as the load balancer like session aware load balancing at the SOAP session
  • 26. More.. • Throttling and caching at the Synapse layer – Concurrency throttling handles the scalability gracefully by rejecting the messages – Caching improves the availability • Fault tolerance through a fault handling mechanism
  • 27. Summary • Synapse load balancing and fail over routing can be used to achieve high availability of the web services • Synapse is scalable with the non locking transport and streaming • Session aware load balancing on SOAP message is an added advantage of using synapse • Availability of the web services can be achieved with the the correct deployment with synapse