Aceu2009 Synapse Scalability Availability
-
Upload
guest60ed0b -
Category
Technology
-
view
3.022 -
download
0
description
Transcript of Aceu2009 Synapse Scalability Availability
![Page 1: Aceu2009 Synapse Scalability Availability](https://reader034.fdocuments.us/reader034/viewer/2022051413/55381c734a79595b7a8b468b/html5/thumbnails/1.jpg)
Achieving Scalability and High Availability for
clustered Web Services using Apache Synapse
Ruwan Linton [[email protected]]
WSO2 Inc.
![Page 2: Aceu2009 Synapse Scalability Availability](https://reader034.fdocuments.us/reader034/viewer/2022051413/55381c734a79595b7a8b468b/html5/thumbnails/2.jpg)
Contents
• Introduction– Apache Synapse– Web services clustering– Scalability/Availability in general
• Configuration– Proxy Service– Load balance and Fail over endpoints
![Page 3: Aceu2009 Synapse Scalability Availability](https://reader034.fdocuments.us/reader034/viewer/2022051413/55381c734a79595b7a8b468b/html5/thumbnails/3.jpg)
Contents (Cntd..)• Architecture
– Stateless load balancing– State full load balancing– Load balancing with fail over
– Dynamic load balancing
• Deployment
![Page 4: Aceu2009 Synapse Scalability Availability](https://reader034.fdocuments.us/reader034/viewer/2022051413/55381c734a79595b7a8b468b/html5/thumbnails/4.jpg)
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
![Page 5: Aceu2009 Synapse Scalability Availability](https://reader034.fdocuments.us/reader034/viewer/2022051413/55381c734a79595b7a8b468b/html5/thumbnails/5.jpg)
![Page 6: Aceu2009 Synapse Scalability Availability](https://reader034.fdocuments.us/reader034/viewer/2022051413/55381c734a79595b7a8b468b/html5/thumbnails/6.jpg)
Synapse operational models
• Virtual Service (Proxy service) model
• Message mediation model
• Scheduled work
• Event driven architecture (Event broker)
![Page 7: Aceu2009 Synapse Scalability Availability](https://reader034.fdocuments.us/reader034/viewer/2022051413/55381c734a79595b7a8b468b/html5/thumbnails/7.jpg)
Virtual Services
![Page 8: Aceu2009 Synapse Scalability Availability](https://reader034.fdocuments.us/reader034/viewer/2022051413/55381c734a79595b7a8b468b/html5/thumbnails/8.jpg)
Web services clustering• Different servers
providing the same service
• Group communication within the servers
• Shared resources for the cluster
![Page 9: Aceu2009 Synapse Scalability Availability](https://reader034.fdocuments.us/reader034/viewer/2022051413/55381c734a79595b7a8b468b/html5/thumbnails/9.jpg)
Scalability
Ability to either handle growing amounts of work in a graceful manner,
or to be readily enlarged
![Page 10: Aceu2009 Synapse Scalability Availability](https://reader034.fdocuments.us/reader034/viewer/2022051413/55381c734a79595b7a8b468b/html5/thumbnails/10.jpg)
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
![Page 11: Aceu2009 Synapse Scalability Availability](https://reader034.fdocuments.us/reader034/viewer/2022051413/55381c734a79595b7a8b468b/html5/thumbnails/11.jpg)
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
![Page 12: Aceu2009 Synapse Scalability Availability](https://reader034.fdocuments.us/reader034/viewer/2022051413/55381c734a79595b7a8b468b/html5/thumbnails/12.jpg)
Sample proxy
<proxy name=”foo”>
<target inSequence=”ref-seq”>
<endpoint>
<address uri=”http://host/service”/>
</endpoint>
<target>
</proxy>
![Page 13: Aceu2009 Synapse Scalability Availability](https://reader034.fdocuments.us/reader034/viewer/2022051413/55381c734a79595b7a8b468b/html5/thumbnails/13.jpg)
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
![Page 14: Aceu2009 Synapse Scalability Availability](https://reader034.fdocuments.us/reader034/viewer/2022051413/55381c734a79595b7a8b468b/html5/thumbnails/14.jpg)
Sample LB endpoint
<endpoint name=”test-lb”>
<session type=”soap”/>
<loadbalance policy=”roundRobin”>
<endpoint ..../>
..
..
</loadbalance>
</endpoint>
![Page 15: Aceu2009 Synapse Scalability Availability](https://reader034.fdocuments.us/reader034/viewer/2022051413/55381c734a79595b7a8b468b/html5/thumbnails/15.jpg)
Architecture• Stateless load balancing
– LB algorithm implementation is pluggable
– Built in round robin algorithm
– Weighted LB algorithm
![Page 16: Aceu2009 Synapse Scalability Availability](https://reader034.fdocuments.us/reader034/viewer/2022051413/55381c734a79595b7a8b468b/html5/thumbnails/16.jpg)
State full session aware load balancing
• Transport and SOAP session
• Client initiated vs Server initiated
![Page 17: Aceu2009 Synapse Scalability Availability](https://reader034.fdocuments.us/reader034/viewer/2022051413/55381c734a79595b7a8b468b/html5/thumbnails/17.jpg)
Fail over with LB
![Page 18: Aceu2009 Synapse Scalability Availability](https://reader034.fdocuments.us/reader034/viewer/2022051413/55381c734a79595b7a8b468b/html5/thumbnails/18.jpg)
LB and FO groups
![Page 19: Aceu2009 Synapse Scalability Availability](https://reader034.fdocuments.us/reader034/viewer/2022051413/55381c734a79595b7a8b468b/html5/thumbnails/19.jpg)
Dynamic LB
![Page 20: Aceu2009 Synapse Scalability Availability](https://reader034.fdocuments.us/reader034/viewer/2022051413/55381c734a79595b7a8b468b/html5/thumbnails/20.jpg)
Dynamic LB (Cntd..)
![Page 21: Aceu2009 Synapse Scalability Availability](https://reader034.fdocuments.us/reader034/viewer/2022051413/55381c734a79595b7a8b468b/html5/thumbnails/21.jpg)
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
![Page 22: Aceu2009 Synapse Scalability Availability](https://reader034.fdocuments.us/reader034/viewer/2022051413/55381c734a79595b7a8b468b/html5/thumbnails/22.jpg)
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
![Page 23: Aceu2009 Synapse Scalability Availability](https://reader034.fdocuments.us/reader034/viewer/2022051413/55381c734a79595b7a8b468b/html5/thumbnails/23.jpg)
Deployment diagram
![Page 24: Aceu2009 Synapse Scalability Availability](https://reader034.fdocuments.us/reader034/viewer/2022051413/55381c734a79595b7a8b468b/html5/thumbnails/24.jpg)
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
![Page 25: Aceu2009 Synapse Scalability Availability](https://reader034.fdocuments.us/reader034/viewer/2022051413/55381c734a79595b7a8b468b/html5/thumbnails/25.jpg)
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
![Page 26: Aceu2009 Synapse Scalability Availability](https://reader034.fdocuments.us/reader034/viewer/2022051413/55381c734a79595b7a8b468b/html5/thumbnails/26.jpg)
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
![Page 27: Aceu2009 Synapse Scalability Availability](https://reader034.fdocuments.us/reader034/viewer/2022051413/55381c734a79595b7a8b468b/html5/thumbnails/27.jpg)
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
![Page 28: Aceu2009 Synapse Scalability Availability](https://reader034.fdocuments.us/reader034/viewer/2022051413/55381c734a79595b7a8b468b/html5/thumbnails/28.jpg)
Thank You!
Questions??