SlideShare a Scribd company logo
1 of 34
Download to read offline
Maximize Messaging
   Performance and
Lowering Infrastructure
       Footprint
    Senior Software Architect, WSO2 Inc.
    Visiting Faculty, University of Moratuwa
    Member, Apache Software Foundation
 Research Scientist, Lanka Software Foundation
Outline
 Goals: Optimizing the deployments
  o Message performance
  o Reduce footprint
 Design and Capacity Planning
 Design for Performance and Minimal footprint
  o Select right transport
  o Minimize footprint and maximize sharing
    - MT
    - Using Carbon
  o Tuning
 Wrapping Up
About Mission critical webinar
series
Example Scenario
Outline on Capacity planning
 We discussed this in the Asanka’s webinar last
  week
 Rough task list
  o   Design an architecture
  o   Estimate expected capacity of the who system
  o   Find the capacity for each type of node
  o   Calculate the number of nodes required
  o   Build a POC and verify
Outline on Capacity planning (Contd.)
Our Goal
 Building smaller systems saves lot of money
  and effort
  o Maximizing the performance
  o minimizing the footprint
 This webinar explains how to capitalize WSO2
  products to that end
How?
 WSO2 Platform provides several techniques to
  optimize deployments
 Some of the techniques
  o   Selecting the right transport
  o   New performance improvements to ESB
  o   Use carbon to create minimal servers
  o   Use Multi-tenancy to maximize sharing
  o   Tuning your setup
Select the right Message Transport
 WSO2 platform provide several choices for your
  system to communicate
  o   SOAP
  o   HTTP/JSON
  o   Thrift
  o   AMQP
  o   Others
      -   XMPP
      -   TCP
      -   Mail/ SMTP
      -   FTP
      -   Domain specific formats like FIX
Message Transports
           Performance    Interopera    Reliability     Security      Asynchron
            (2 core, 4G      bility                                      ous
            with 4-10K                                                messaging
           messages )
                TPS
 SOAP          2K         Very good         Has           WS-             ?
                                        transactions   Security/SSL
JSON+HTT       5k           Good             X             SSL           X
   P
  Thrift    20K-100K      OK, but not        X             SSL           X
                            widely
                           adopted
 AMQP          1K         OK within          Has           SSL           Yes
                            JMS         transactions
                          systems            and
                                          persistent
                                         messaging
Select the right Message Transport
 Several concerns
  o Performance
  o Interoperability
  o Support for Add-On features like transactions,
    reliability, security
  o Ease of use
  o Asynchronous nature
 Use what is enough
  o E.g. internal communication can use thrift while
    external communication can use HTTP/JSON for
    SOAP
Select the right Message Transport
Data Bridge
 Highly optimized event collection framework
  o Many agents can emit events using the data bridge
  o They are collected and processed as receivers
  o Use by WSO2 CEP and WSO2 BAM
 Very Fast
  o   Can do few 100k events per second
  o   Uses Apache thrift
  o   Asynchronous
  o   Support buffering and batch delivery
  o   Data formats are predefined and transferred as
      tuples
Minimize the Product Footprint
 What do we mean by foot print?
  o Product size (disk space, download)
  o Memory foot print
  o Unused functionality
 Two main ideas
  o Remove what is not needed
  o Maximize sharing
 WSO2 platform provides 2 choices to minimize
  the footprint
  o Use carbon to build a minimal Product
  o Use Multi-tenancy to maximize sharing
WSO2 Carbon
                                        OSGI based
                                         components
                                         runtimes
                                        Products are
                                         created by
                                         composing
                                         components




o Read “Carbon: towards a server building
  framework for SOA platform” for more details.
Build Minimal Product
 So you can customize and create a minimal
  product by adding and removing components
   E.g. We were able to make WSO2 IS with 64MB heap this
    way for a given scenario.
 In smaller load cases, you can combine
  multiple products to a one product
  o E.g. Add service hosting to BPS
What is Multi-tenancy ?




   Many Parties share the same set of resources,
    while giving each one his own space
Why Multi-tenancy? 1. Increased sharing

• Cloud shares
  resources across a
  large pool of users.
• Now sharing
  happens in the
  application level as
  oppose to sharing at          “There is no delight in
                              owning anything unshared.”
  OS level for multiple            Seneca (Roman philosopher, mid-1st
                                             century AD)
  processes and
  sharing at HW level
  with VMs.
• That can bring
  greater savings
                                                 photo by Ben Gray on Flickr,
                          http://www.flickr.com/photos/ben_grey/4582294721/, Licensed under CC
Why Multi-tenancy? 2. Provide “pay for what you
use”

  •   Often there will be many accounts
      in a PaaS or a SaaS, but only a
      fraction of them will be in use.
  •   We cannot allocate runtime
      resource per account (disk may be
      ok, as it is cheap). For example,
      we cannot run a VM per account.
  •   By sharing the same server with
      many users, Multi-tenancy provides
      much reduced runtime cost per
      server.
How does it Help?
• All WSO2 products support
  • multi-tenancy
  • Running in the cloud in pay as you go fashion
• So you can share same physical server across
  many (e.g. departments) logically
• Or you can outsource some parts of the design
  to a PaaS (e.g. Stratos Live)
Recent Performance Improvements
   Native support for JSON
   Pass-through support for ESB
   Streaming Xpath and XSLT
   CEP 2.0
Native Support for JSON
 Now WSO2 platform has native support for
  JSON through Gson library
ESB Passthrough and Streaming XSLT
ESB Passthrough and Streaming XSLT
 ESB request = message + headers
 If mediation logic only depends on headers, we
  skip message building
  o Binary relay – we copy the message as bytes from
    input side to output side
  o Pass-through – we copy messages at NIO buffer
    level
 If mediation logic does not edit the message,
  but read the message, we build the message,
  but write the incoming bytes out as is to avoid
  serialization.
ESB Improved Performance
Complex Event Processor 2.0
 Now CEP server 2.0 comes with a new runtime
  called Siddhi
 Very fast
  o About 2.5M events/sec with java events
  o About 250k events/sec over data bridge
 Supports Distributed Cache and Persistence for
  HA
 More details from
  o http://wso2.com/products/complex-event-
    processor/
Tuning
 OS Level Tuning
  o For example,
    http://www.lognormal.com/blog/2012/09/27/linu
    x-tcpip-tuning/
  o Generally available with the product
  o It depends on OS etc.
 Product Tuning
  o Thread pools sizes mainly, there may be others
 Application Tuning
  o This is your application, it is good idea to do a
    profile and see.
Performance of a Server
What we expect from Tuning
 Goals
  o Max Throughput
  o Within Given Latency
 How do we know we are at Max?
  o Does resource consumption is high?
  o What are the resources
     - CPU
     - Memory
     - IO (Network and Disk)
  o At last one should max out
  o E.g. if you have too many locks, all above 3 may be
    low and you get sub-optimal throughput
 We fix problems via profiling
  o Detective time!!
Profiling
 First step is connect through JConsole, and get
  basic idea.
 Also monitor the load average, CPU usage, and
  IO operations (via top or Sar)
 Then you can switch to tools like JProfiler,
  Yourkit
 Important views
  o   CPU views (bottlenecks)
  o   Thread views and monitor views
  o   Memory views (GC, allocations, and memory leaks)
  o   IO and JDBC tracing
Some Profiling views
Some Profiling views
Conclusion
 Goals: Optimizing the deployments
  o Message performance
  o Reduce footprint
 Design and Capacity Planning
 Design for Performance and Minimal footprint
  o Select right transport
  o Minimize footprint and maximize sharing
     - MT
     - Using Carbon
  o Tuning
 We also discussed some of the new
  performance improvements.
Questions?

More Related Content

What's hot

Deep-dive into WSO2 ESB 5.0
Deep-dive into WSO2 ESB 5.0 Deep-dive into WSO2 ESB 5.0
Deep-dive into WSO2 ESB 5.0 Kasun Indrasiri
 
Better Enterprise Integration With the WSO2 ESB 4.5.1
Better Enterprise Integration With the WSO2 ESB 4.5.1Better Enterprise Integration With the WSO2 ESB 4.5.1
Better Enterprise Integration With the WSO2 ESB 4.5.1WSO2
 
Enterprise Integration with the WSO2 ESB
Enterprise Integration with the WSO2 ESB Enterprise Integration with the WSO2 ESB
Enterprise Integration with the WSO2 ESB WSO2
 
Building Applications with Carbon Studio on Premise and Cloud
Building Applications with Carbon Studio on Premise and CloudBuilding Applications with Carbon Studio on Premise and Cloud
Building Applications with Carbon Studio on Premise and CloudWSO2
 
How to build a custom stack with WSO2 carbon
How to build a custom stack with WSO2 carbon How to build a custom stack with WSO2 carbon
How to build a custom stack with WSO2 carbon WSO2
 
WSO2 ESB - The Backbone of Integration
WSO2 ESB - The Backbone of Integration WSO2 ESB - The Backbone of Integration
WSO2 ESB - The Backbone of Integration Kasun Indrasiri
 
ESB Evaluation Framework
ESB Evaluation Framework ESB Evaluation Framework
ESB Evaluation Framework WSO2
 
Managing ESB artifacts with the WSO2 Governance Registry
Managing ESB artifacts with the WSO2 Governance Registry Managing ESB artifacts with the WSO2 Governance Registry
Managing ESB artifacts with the WSO2 Governance Registry WSO2
 
Introducing the WSO2 Elastic Load Balancer
Introducing the WSO2 Elastic Load BalancerIntroducing the WSO2 Elastic Load Balancer
Introducing the WSO2 Elastic Load BalancerWSO2
 
WSO2 and 2 Degrees Case Study
WSO2 and 2 Degrees Case StudyWSO2 and 2 Degrees Case Study
WSO2 and 2 Degrees Case StudyWSO2
 
Application development using the wso2 developer studio
Application development using the wso2 developer studioApplication development using the wso2 developer studio
Application development using the wso2 developer studioWSO2
 
Summer School Delivering On-Demand Shared Middleware Services
Summer School   Delivering On-Demand Shared Middleware ServicesSummer School   Delivering On-Demand Shared Middleware Services
Summer School Delivering On-Demand Shared Middleware ServicesWSO2
 
Quarterly WSO2 Platform Update Webinar - Q1 2016
Quarterly WSO2 Platform Update Webinar - Q1 2016Quarterly WSO2 Platform Update Webinar - Q1 2016
Quarterly WSO2 Platform Update Webinar - Q1 2016WSO2
 
How to extend WSO2 Carbon for your middleware needs
How to extend WSO2 Carbon for your middleware needsHow to extend WSO2 Carbon for your middleware needs
How to extend WSO2 Carbon for your middleware needsWSO2
 
WSO2 Product Release Webinar - Introducing the WSO2 Complex Event Processor
WSO2 Product Release Webinar - Introducing the WSO2 Complex Event Processor WSO2 Product Release Webinar - Introducing the WSO2 Complex Event Processor
WSO2 Product Release Webinar - Introducing the WSO2 Complex Event Processor WSO2
 
Role of Rest vs. Web Services and EI
Role of Rest vs. Web Services and EIRole of Rest vs. Web Services and EI
Role of Rest vs. Web Services and EIWSO2
 
WSO2Con USA 2015: Building Web Apps with Reusable UI Components and Composition
WSO2Con USA 2015: Building Web Apps with Reusable UI Components and CompositionWSO2Con USA 2015: Building Web Apps with Reusable UI Components and Composition
WSO2Con USA 2015: Building Web Apps with Reusable UI Components and CompositionWSO2
 
Buiding and Deploying SaaS with WSO2 as as-a-Service
Buiding and Deploying SaaS with WSO2 as as-a-ServiceBuiding and Deploying SaaS with WSO2 as as-a-Service
Buiding and Deploying SaaS with WSO2 as as-a-ServiceWSO2
 
WSO2 Intro Webinar - Scale your business with the cloud enabled WSO2 Applica...
WSO2 Intro Webinar -  Scale your business with the cloud enabled WSO2 Applica...WSO2 Intro Webinar -  Scale your business with the cloud enabled WSO2 Applica...
WSO2 Intro Webinar - Scale your business with the cloud enabled WSO2 Applica...WSO2
 

What's hot (20)

Deep-dive into WSO2 ESB 5.0
Deep-dive into WSO2 ESB 5.0 Deep-dive into WSO2 ESB 5.0
Deep-dive into WSO2 ESB 5.0
 
Better Enterprise Integration With the WSO2 ESB 4.5.1
Better Enterprise Integration With the WSO2 ESB 4.5.1Better Enterprise Integration With the WSO2 ESB 4.5.1
Better Enterprise Integration With the WSO2 ESB 4.5.1
 
Enterprise Integration with the WSO2 ESB
Enterprise Integration with the WSO2 ESB Enterprise Integration with the WSO2 ESB
Enterprise Integration with the WSO2 ESB
 
Building Applications with Carbon Studio on Premise and Cloud
Building Applications with Carbon Studio on Premise and CloudBuilding Applications with Carbon Studio on Premise and Cloud
Building Applications with Carbon Studio on Premise and Cloud
 
How to build a custom stack with WSO2 carbon
How to build a custom stack with WSO2 carbon How to build a custom stack with WSO2 carbon
How to build a custom stack with WSO2 carbon
 
WSO2 ESB - The Backbone of Integration
WSO2 ESB - The Backbone of Integration WSO2 ESB - The Backbone of Integration
WSO2 ESB - The Backbone of Integration
 
ESB Evaluation Framework
ESB Evaluation Framework ESB Evaluation Framework
ESB Evaluation Framework
 
Managing ESB artifacts with the WSO2 Governance Registry
Managing ESB artifacts with the WSO2 Governance Registry Managing ESB artifacts with the WSO2 Governance Registry
Managing ESB artifacts with the WSO2 Governance Registry
 
Wso2 esb
Wso2 esbWso2 esb
Wso2 esb
 
Introducing the WSO2 Elastic Load Balancer
Introducing the WSO2 Elastic Load BalancerIntroducing the WSO2 Elastic Load Balancer
Introducing the WSO2 Elastic Load Balancer
 
WSO2 and 2 Degrees Case Study
WSO2 and 2 Degrees Case StudyWSO2 and 2 Degrees Case Study
WSO2 and 2 Degrees Case Study
 
Application development using the wso2 developer studio
Application development using the wso2 developer studioApplication development using the wso2 developer studio
Application development using the wso2 developer studio
 
Summer School Delivering On-Demand Shared Middleware Services
Summer School   Delivering On-Demand Shared Middleware ServicesSummer School   Delivering On-Demand Shared Middleware Services
Summer School Delivering On-Demand Shared Middleware Services
 
Quarterly WSO2 Platform Update Webinar - Q1 2016
Quarterly WSO2 Platform Update Webinar - Q1 2016Quarterly WSO2 Platform Update Webinar - Q1 2016
Quarterly WSO2 Platform Update Webinar - Q1 2016
 
How to extend WSO2 Carbon for your middleware needs
How to extend WSO2 Carbon for your middleware needsHow to extend WSO2 Carbon for your middleware needs
How to extend WSO2 Carbon for your middleware needs
 
WSO2 Product Release Webinar - Introducing the WSO2 Complex Event Processor
WSO2 Product Release Webinar - Introducing the WSO2 Complex Event Processor WSO2 Product Release Webinar - Introducing the WSO2 Complex Event Processor
WSO2 Product Release Webinar - Introducing the WSO2 Complex Event Processor
 
Role of Rest vs. Web Services and EI
Role of Rest vs. Web Services and EIRole of Rest vs. Web Services and EI
Role of Rest vs. Web Services and EI
 
WSO2Con USA 2015: Building Web Apps with Reusable UI Components and Composition
WSO2Con USA 2015: Building Web Apps with Reusable UI Components and CompositionWSO2Con USA 2015: Building Web Apps with Reusable UI Components and Composition
WSO2Con USA 2015: Building Web Apps with Reusable UI Components and Composition
 
Buiding and Deploying SaaS with WSO2 as as-a-Service
Buiding and Deploying SaaS with WSO2 as as-a-ServiceBuiding and Deploying SaaS with WSO2 as as-a-Service
Buiding and Deploying SaaS with WSO2 as as-a-Service
 
WSO2 Intro Webinar - Scale your business with the cloud enabled WSO2 Applica...
WSO2 Intro Webinar -  Scale your business with the cloud enabled WSO2 Applica...WSO2 Intro Webinar -  Scale your business with the cloud enabled WSO2 Applica...
WSO2 Intro Webinar - Scale your business with the cloud enabled WSO2 Applica...
 

Similar to Maximize Messaging and Performance and Lowering Infrastructure Footprint

HornetQ Presentation On JBoss World 2009
HornetQ Presentation On JBoss World 2009HornetQ Presentation On JBoss World 2009
HornetQ Presentation On JBoss World 2009jarfield
 
Building Highly Scalable Immersive Media Solutions on AWS
Building Highly Scalable Immersive Media Solutions on AWSBuilding Highly Scalable Immersive Media Solutions on AWS
Building Highly Scalable Immersive Media Solutions on AWSETCenter
 
WSO2 Application Server - Product Overview
WSO2 Application Server - Product OverviewWSO2 Application Server - Product Overview
WSO2 Application Server - Product OverviewWSO2
 
High Volume Web API Management with the WSO2 ESB
High Volume Web API Management with the WSO2 ESBHigh Volume Web API Management with the WSO2 ESB
High Volume Web API Management with the WSO2 ESBPaul Fremantle
 
[AWS LA Media & Entertainment Event 2015]: Shoot the Bird: Linear Broadcast o...
[AWS LA Media & Entertainment Event 2015]: Shoot the Bird: Linear Broadcast o...[AWS LA Media & Entertainment Event 2015]: Shoot the Bird: Linear Broadcast o...
[AWS LA Media & Entertainment Event 2015]: Shoot the Bird: Linear Broadcast o...Amazon Web Services
 
Messaging - RabbitMQ, Azure (Service Bus), Docker and Azure Functions
Messaging - RabbitMQ, Azure (Service Bus), Docker and Azure FunctionsMessaging - RabbitMQ, Azure (Service Bus), Docker and Azure Functions
Messaging - RabbitMQ, Azure (Service Bus), Docker and Azure FunctionsJohn Staveley
 
Wso2 con 2014-us-talk-deep dive into apache stratos & private paas
Wso2 con 2014-us-talk-deep dive into apache stratos & private paasWso2 con 2014-us-talk-deep dive into apache stratos & private paas
Wso2 con 2014-us-talk-deep dive into apache stratos & private paasLakmal Warusawithana
 
EQR Reporting: Rails + Amazon EC2
EQR Reporting:  Rails + Amazon EC2EQR Reporting:  Rails + Amazon EC2
EQR Reporting: Rails + Amazon EC2jeperkins4
 
System to generate speech to text in real time
System to generate speech to text in real timeSystem to generate speech to text in real time
System to generate speech to text in real timeSaptarshi Chatterjee
 
No More Hops Towards A Linearly Scalable Application Infrastructure
No More Hops Towards A Linearly Scalable Application InfrastructureNo More Hops Towards A Linearly Scalable Application Infrastructure
No More Hops Towards A Linearly Scalable Application InfrastructureConSanFrancisco123
 
Introduction to streaming and messaging flume,kafka,SQS,kinesis
Introduction to streaming and messaging  flume,kafka,SQS,kinesis Introduction to streaming and messaging  flume,kafka,SQS,kinesis
Introduction to streaming and messaging flume,kafka,SQS,kinesis Omid Vahdaty
 
WSO2Con USA 2015: An Introduction to the WSO2 Integration Platform
WSO2Con USA 2015: An Introduction to the WSO2 Integration PlatformWSO2Con USA 2015: An Introduction to the WSO2 Integration Platform
WSO2Con USA 2015: An Introduction to the WSO2 Integration PlatformWSO2
 
The Art of Message Queues - TEKX
The Art of Message Queues - TEKXThe Art of Message Queues - TEKX
The Art of Message Queues - TEKXMike Willbanks
 
Jazoon2010 - Edgar Silva - Open source SOA on Steroids
Jazoon2010 - Edgar Silva - Open source SOA on SteroidsJazoon2010 - Edgar Silva - Open source SOA on Steroids
Jazoon2010 - Edgar Silva - Open source SOA on SteroidsEdgar Silva
 
Mobility Information Series - Webservice Architecture Comparison by RapidValue
Mobility Information Series - Webservice Architecture Comparison by RapidValueMobility Information Series - Webservice Architecture Comparison by RapidValue
Mobility Information Series - Webservice Architecture Comparison by RapidValueRapidValue
 
Ground-Cloud-Cloud-Ground - NAB 2022 IP Showcase
Ground-Cloud-Cloud-Ground - NAB 2022 IP ShowcaseGround-Cloud-Cloud-Ground - NAB 2022 IP Showcase
Ground-Cloud-Cloud-Ground - NAB 2022 IP ShowcaseKieran Kunhya
 
Real-Time with Flowdock
Real-Time with FlowdockReal-Time with Flowdock
Real-Time with FlowdockFlowdock
 
Make easier Integration of your services with Fuse Solutions - RedHat 2013
Make easier Integration of your services with Fuse Solutions - RedHat 2013Make easier Integration of your services with Fuse Solutions - RedHat 2013
Make easier Integration of your services with Fuse Solutions - RedHat 2013Charles Moulliard
 

Similar to Maximize Messaging and Performance and Lowering Infrastructure Footprint (20)

Jbw chicago
Jbw chicagoJbw chicago
Jbw chicago
 
HornetQ Presentation On JBoss World 2009
HornetQ Presentation On JBoss World 2009HornetQ Presentation On JBoss World 2009
HornetQ Presentation On JBoss World 2009
 
Building Highly Scalable Immersive Media Solutions on AWS
Building Highly Scalable Immersive Media Solutions on AWSBuilding Highly Scalable Immersive Media Solutions on AWS
Building Highly Scalable Immersive Media Solutions on AWS
 
WSO2 Application Server - Product Overview
WSO2 Application Server - Product OverviewWSO2 Application Server - Product Overview
WSO2 Application Server - Product Overview
 
Riding with camel
Riding with camelRiding with camel
Riding with camel
 
High Volume Web API Management with the WSO2 ESB
High Volume Web API Management with the WSO2 ESBHigh Volume Web API Management with the WSO2 ESB
High Volume Web API Management with the WSO2 ESB
 
[AWS LA Media & Entertainment Event 2015]: Shoot the Bird: Linear Broadcast o...
[AWS LA Media & Entertainment Event 2015]: Shoot the Bird: Linear Broadcast o...[AWS LA Media & Entertainment Event 2015]: Shoot the Bird: Linear Broadcast o...
[AWS LA Media & Entertainment Event 2015]: Shoot the Bird: Linear Broadcast o...
 
Messaging - RabbitMQ, Azure (Service Bus), Docker and Azure Functions
Messaging - RabbitMQ, Azure (Service Bus), Docker and Azure FunctionsMessaging - RabbitMQ, Azure (Service Bus), Docker and Azure Functions
Messaging - RabbitMQ, Azure (Service Bus), Docker and Azure Functions
 
Wso2 con 2014-us-talk-deep dive into apache stratos & private paas
Wso2 con 2014-us-talk-deep dive into apache stratos & private paasWso2 con 2014-us-talk-deep dive into apache stratos & private paas
Wso2 con 2014-us-talk-deep dive into apache stratos & private paas
 
EQR Reporting: Rails + Amazon EC2
EQR Reporting:  Rails + Amazon EC2EQR Reporting:  Rails + Amazon EC2
EQR Reporting: Rails + Amazon EC2
 
System to generate speech to text in real time
System to generate speech to text in real timeSystem to generate speech to text in real time
System to generate speech to text in real time
 
No More Hops Towards A Linearly Scalable Application Infrastructure
No More Hops Towards A Linearly Scalable Application InfrastructureNo More Hops Towards A Linearly Scalable Application Infrastructure
No More Hops Towards A Linearly Scalable Application Infrastructure
 
Introduction to streaming and messaging flume,kafka,SQS,kinesis
Introduction to streaming and messaging  flume,kafka,SQS,kinesis Introduction to streaming and messaging  flume,kafka,SQS,kinesis
Introduction to streaming and messaging flume,kafka,SQS,kinesis
 
WSO2Con USA 2015: An Introduction to the WSO2 Integration Platform
WSO2Con USA 2015: An Introduction to the WSO2 Integration PlatformWSO2Con USA 2015: An Introduction to the WSO2 Integration Platform
WSO2Con USA 2015: An Introduction to the WSO2 Integration Platform
 
The Art of Message Queues - TEKX
The Art of Message Queues - TEKXThe Art of Message Queues - TEKX
The Art of Message Queues - TEKX
 
Jazoon2010 - Edgar Silva - Open source SOA on Steroids
Jazoon2010 - Edgar Silva - Open source SOA on SteroidsJazoon2010 - Edgar Silva - Open source SOA on Steroids
Jazoon2010 - Edgar Silva - Open source SOA on Steroids
 
Mobility Information Series - Webservice Architecture Comparison by RapidValue
Mobility Information Series - Webservice Architecture Comparison by RapidValueMobility Information Series - Webservice Architecture Comparison by RapidValue
Mobility Information Series - Webservice Architecture Comparison by RapidValue
 
Ground-Cloud-Cloud-Ground - NAB 2022 IP Showcase
Ground-Cloud-Cloud-Ground - NAB 2022 IP ShowcaseGround-Cloud-Cloud-Ground - NAB 2022 IP Showcase
Ground-Cloud-Cloud-Ground - NAB 2022 IP Showcase
 
Real-Time with Flowdock
Real-Time with FlowdockReal-Time with Flowdock
Real-Time with Flowdock
 
Make easier Integration of your services with Fuse Solutions - RedHat 2013
Make easier Integration of your services with Fuse Solutions - RedHat 2013Make easier Integration of your services with Fuse Solutions - RedHat 2013
Make easier Integration of your services with Fuse Solutions - RedHat 2013
 

More from WSO2

Accelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with PlatformlessAccelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with PlatformlessWSO2
 
How to Create a Service in Choreo
How to Create a Service in ChoreoHow to Create a Service in Choreo
How to Create a Service in ChoreoWSO2
 
Ballerina Tech Talk - May 2023
Ballerina Tech Talk - May 2023Ballerina Tech Talk - May 2023
Ballerina Tech Talk - May 2023WSO2
 
Platform Strategy to Deliver Digital Experiences on Azure
Platform Strategy to Deliver Digital Experiences on AzurePlatform Strategy to Deliver Digital Experiences on Azure
Platform Strategy to Deliver Digital Experiences on AzureWSO2
 
GartnerITSymSessionSlides.pdf
GartnerITSymSessionSlides.pdfGartnerITSymSessionSlides.pdf
GartnerITSymSessionSlides.pdfWSO2
 
[Webinar] How to Create an API in Minutes
[Webinar] How to Create an API in Minutes[Webinar] How to Create an API in Minutes
[Webinar] How to Create an API in MinutesWSO2
 
Modernizing the Student Journey with Ethos Identity
Modernizing the Student Journey with Ethos IdentityModernizing the Student Journey with Ethos Identity
Modernizing the Student Journey with Ethos IdentityWSO2
 
Choreo - Build unique digital experiences on WSO2's platform, secured by Etho...
Choreo - Build unique digital experiences on WSO2's platform, secured by Etho...Choreo - Build unique digital experiences on WSO2's platform, secured by Etho...
Choreo - Build unique digital experiences on WSO2's platform, secured by Etho...WSO2
 
CIO Summit Berlin 2022.pptx.pdf
CIO Summit Berlin 2022.pptx.pdfCIO Summit Berlin 2022.pptx.pdf
CIO Summit Berlin 2022.pptx.pdfWSO2
 
Delivering New Digital Experiences Fast - Introducing Choreo
Delivering New Digital Experiences Fast - Introducing ChoreoDelivering New Digital Experiences Fast - Introducing Choreo
Delivering New Digital Experiences Fast - Introducing ChoreoWSO2
 
Fueling the Digital Experience Economy with Connected Products
Fueling the Digital Experience Economy with Connected ProductsFueling the Digital Experience Economy with Connected Products
Fueling the Digital Experience Economy with Connected ProductsWSO2
 
A Reference Methodology for Agile Digital Businesses
 A Reference Methodology for Agile Digital Businesses A Reference Methodology for Agile Digital Businesses
A Reference Methodology for Agile Digital BusinessesWSO2
 
Workflows in WSO2 API Manager - WSO2 API Manager Community Call (12/15/2021)
Workflows in WSO2 API Manager - WSO2 API Manager Community Call (12/15/2021)Workflows in WSO2 API Manager - WSO2 API Manager Community Call (12/15/2021)
Workflows in WSO2 API Manager - WSO2 API Manager Community Call (12/15/2021)WSO2
 
Lessons from the pandemic - From a single use case to true transformation
 Lessons from the pandemic - From a single use case to true transformation Lessons from the pandemic - From a single use case to true transformation
Lessons from the pandemic - From a single use case to true transformationWSO2
 
Adding Liveliness to Banking Experiences
Adding Liveliness to Banking ExperiencesAdding Liveliness to Banking Experiences
Adding Liveliness to Banking ExperiencesWSO2
 
Building a Future-ready Bank
Building a Future-ready BankBuilding a Future-ready Bank
Building a Future-ready BankWSO2
 
WSO2 API Manager Community Call - November 2021
WSO2 API Manager Community Call - November 2021WSO2 API Manager Community Call - November 2021
WSO2 API Manager Community Call - November 2021WSO2
 
[API World ] - Managing Asynchronous APIs
[API World ] - Managing Asynchronous APIs[API World ] - Managing Asynchronous APIs
[API World ] - Managing Asynchronous APIsWSO2
 
[API World 2021 ] - Understanding Cloud Native Deployment
[API World 2021 ] - Understanding Cloud Native Deployment[API World 2021 ] - Understanding Cloud Native Deployment
[API World 2021 ] - Understanding Cloud Native DeploymentWSO2
 
[API Word 2021] - Quantum Duality of “API as a Business and a Technology”
[API Word 2021] - Quantum Duality of “API as a Business and a Technology”[API Word 2021] - Quantum Duality of “API as a Business and a Technology”
[API Word 2021] - Quantum Duality of “API as a Business and a Technology”WSO2
 

More from WSO2 (20)

Accelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with PlatformlessAccelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with Platformless
 
How to Create a Service in Choreo
How to Create a Service in ChoreoHow to Create a Service in Choreo
How to Create a Service in Choreo
 
Ballerina Tech Talk - May 2023
Ballerina Tech Talk - May 2023Ballerina Tech Talk - May 2023
Ballerina Tech Talk - May 2023
 
Platform Strategy to Deliver Digital Experiences on Azure
Platform Strategy to Deliver Digital Experiences on AzurePlatform Strategy to Deliver Digital Experiences on Azure
Platform Strategy to Deliver Digital Experiences on Azure
 
GartnerITSymSessionSlides.pdf
GartnerITSymSessionSlides.pdfGartnerITSymSessionSlides.pdf
GartnerITSymSessionSlides.pdf
 
[Webinar] How to Create an API in Minutes
[Webinar] How to Create an API in Minutes[Webinar] How to Create an API in Minutes
[Webinar] How to Create an API in Minutes
 
Modernizing the Student Journey with Ethos Identity
Modernizing the Student Journey with Ethos IdentityModernizing the Student Journey with Ethos Identity
Modernizing the Student Journey with Ethos Identity
 
Choreo - Build unique digital experiences on WSO2's platform, secured by Etho...
Choreo - Build unique digital experiences on WSO2's platform, secured by Etho...Choreo - Build unique digital experiences on WSO2's platform, secured by Etho...
Choreo - Build unique digital experiences on WSO2's platform, secured by Etho...
 
CIO Summit Berlin 2022.pptx.pdf
CIO Summit Berlin 2022.pptx.pdfCIO Summit Berlin 2022.pptx.pdf
CIO Summit Berlin 2022.pptx.pdf
 
Delivering New Digital Experiences Fast - Introducing Choreo
Delivering New Digital Experiences Fast - Introducing ChoreoDelivering New Digital Experiences Fast - Introducing Choreo
Delivering New Digital Experiences Fast - Introducing Choreo
 
Fueling the Digital Experience Economy with Connected Products
Fueling the Digital Experience Economy with Connected ProductsFueling the Digital Experience Economy with Connected Products
Fueling the Digital Experience Economy with Connected Products
 
A Reference Methodology for Agile Digital Businesses
 A Reference Methodology for Agile Digital Businesses A Reference Methodology for Agile Digital Businesses
A Reference Methodology for Agile Digital Businesses
 
Workflows in WSO2 API Manager - WSO2 API Manager Community Call (12/15/2021)
Workflows in WSO2 API Manager - WSO2 API Manager Community Call (12/15/2021)Workflows in WSO2 API Manager - WSO2 API Manager Community Call (12/15/2021)
Workflows in WSO2 API Manager - WSO2 API Manager Community Call (12/15/2021)
 
Lessons from the pandemic - From a single use case to true transformation
 Lessons from the pandemic - From a single use case to true transformation Lessons from the pandemic - From a single use case to true transformation
Lessons from the pandemic - From a single use case to true transformation
 
Adding Liveliness to Banking Experiences
Adding Liveliness to Banking ExperiencesAdding Liveliness to Banking Experiences
Adding Liveliness to Banking Experiences
 
Building a Future-ready Bank
Building a Future-ready BankBuilding a Future-ready Bank
Building a Future-ready Bank
 
WSO2 API Manager Community Call - November 2021
WSO2 API Manager Community Call - November 2021WSO2 API Manager Community Call - November 2021
WSO2 API Manager Community Call - November 2021
 
[API World ] - Managing Asynchronous APIs
[API World ] - Managing Asynchronous APIs[API World ] - Managing Asynchronous APIs
[API World ] - Managing Asynchronous APIs
 
[API World 2021 ] - Understanding Cloud Native Deployment
[API World 2021 ] - Understanding Cloud Native Deployment[API World 2021 ] - Understanding Cloud Native Deployment
[API World 2021 ] - Understanding Cloud Native Deployment
 
[API Word 2021] - Quantum Duality of “API as a Business and a Technology”
[API Word 2021] - Quantum Duality of “API as a Business and a Technology”[API Word 2021] - Quantum Duality of “API as a Business and a Technology”
[API Word 2021] - Quantum Duality of “API as a Business and a Technology”
 

Maximize Messaging and Performance and Lowering Infrastructure Footprint

  • 1. Maximize Messaging Performance and Lowering Infrastructure Footprint Senior Software Architect, WSO2 Inc. Visiting Faculty, University of Moratuwa Member, Apache Software Foundation Research Scientist, Lanka Software Foundation
  • 2. Outline  Goals: Optimizing the deployments o Message performance o Reduce footprint  Design and Capacity Planning  Design for Performance and Minimal footprint o Select right transport o Minimize footprint and maximize sharing - MT - Using Carbon o Tuning  Wrapping Up
  • 3. About Mission critical webinar series
  • 5. Outline on Capacity planning  We discussed this in the Asanka’s webinar last week  Rough task list o Design an architecture o Estimate expected capacity of the who system o Find the capacity for each type of node o Calculate the number of nodes required o Build a POC and verify
  • 6. Outline on Capacity planning (Contd.)
  • 7. Our Goal  Building smaller systems saves lot of money and effort o Maximizing the performance o minimizing the footprint  This webinar explains how to capitalize WSO2 products to that end
  • 8. How?  WSO2 Platform provides several techniques to optimize deployments  Some of the techniques o Selecting the right transport o New performance improvements to ESB o Use carbon to create minimal servers o Use Multi-tenancy to maximize sharing o Tuning your setup
  • 9. Select the right Message Transport  WSO2 platform provide several choices for your system to communicate o SOAP o HTTP/JSON o Thrift o AMQP o Others - XMPP - TCP - Mail/ SMTP - FTP - Domain specific formats like FIX
  • 10. Message Transports Performance Interopera Reliability Security Asynchron (2 core, 4G bility ous with 4-10K messaging messages ) TPS SOAP 2K Very good Has WS- ? transactions Security/SSL JSON+HTT 5k Good X SSL X P Thrift 20K-100K OK, but not X SSL X widely adopted AMQP 1K OK within Has SSL Yes JMS transactions systems and persistent messaging
  • 11. Select the right Message Transport  Several concerns o Performance o Interoperability o Support for Add-On features like transactions, reliability, security o Ease of use o Asynchronous nature  Use what is enough o E.g. internal communication can use thrift while external communication can use HTTP/JSON for SOAP
  • 12. Select the right Message Transport
  • 13. Data Bridge  Highly optimized event collection framework o Many agents can emit events using the data bridge o They are collected and processed as receivers o Use by WSO2 CEP and WSO2 BAM  Very Fast o Can do few 100k events per second o Uses Apache thrift o Asynchronous o Support buffering and batch delivery o Data formats are predefined and transferred as tuples
  • 14. Minimize the Product Footprint  What do we mean by foot print? o Product size (disk space, download) o Memory foot print o Unused functionality  Two main ideas o Remove what is not needed o Maximize sharing  WSO2 platform provides 2 choices to minimize the footprint o Use carbon to build a minimal Product o Use Multi-tenancy to maximize sharing
  • 15. WSO2 Carbon  OSGI based components runtimes  Products are created by composing components o Read “Carbon: towards a server building framework for SOA platform” for more details.
  • 16. Build Minimal Product  So you can customize and create a minimal product by adding and removing components  E.g. We were able to make WSO2 IS with 64MB heap this way for a given scenario.  In smaller load cases, you can combine multiple products to a one product o E.g. Add service hosting to BPS
  • 17. What is Multi-tenancy ?  Many Parties share the same set of resources, while giving each one his own space
  • 18. Why Multi-tenancy? 1. Increased sharing • Cloud shares resources across a large pool of users. • Now sharing happens in the application level as oppose to sharing at “There is no delight in owning anything unshared.” OS level for multiple Seneca (Roman philosopher, mid-1st century AD) processes and sharing at HW level with VMs. • That can bring greater savings photo by Ben Gray on Flickr, http://www.flickr.com/photos/ben_grey/4582294721/, Licensed under CC
  • 19. Why Multi-tenancy? 2. Provide “pay for what you use” • Often there will be many accounts in a PaaS or a SaaS, but only a fraction of them will be in use. • We cannot allocate runtime resource per account (disk may be ok, as it is cheap). For example, we cannot run a VM per account. • By sharing the same server with many users, Multi-tenancy provides much reduced runtime cost per server.
  • 20. How does it Help? • All WSO2 products support • multi-tenancy • Running in the cloud in pay as you go fashion • So you can share same physical server across many (e.g. departments) logically • Or you can outsource some parts of the design to a PaaS (e.g. Stratos Live)
  • 21. Recent Performance Improvements  Native support for JSON  Pass-through support for ESB  Streaming Xpath and XSLT  CEP 2.0
  • 22. Native Support for JSON  Now WSO2 platform has native support for JSON through Gson library
  • 23. ESB Passthrough and Streaming XSLT
  • 24. ESB Passthrough and Streaming XSLT  ESB request = message + headers  If mediation logic only depends on headers, we skip message building o Binary relay – we copy the message as bytes from input side to output side o Pass-through – we copy messages at NIO buffer level  If mediation logic does not edit the message, but read the message, we build the message, but write the incoming bytes out as is to avoid serialization.
  • 26. Complex Event Processor 2.0  Now CEP server 2.0 comes with a new runtime called Siddhi  Very fast o About 2.5M events/sec with java events o About 250k events/sec over data bridge  Supports Distributed Cache and Persistence for HA  More details from o http://wso2.com/products/complex-event- processor/
  • 27. Tuning  OS Level Tuning o For example, http://www.lognormal.com/blog/2012/09/27/linu x-tcpip-tuning/ o Generally available with the product o It depends on OS etc.  Product Tuning o Thread pools sizes mainly, there may be others  Application Tuning o This is your application, it is good idea to do a profile and see.
  • 29. What we expect from Tuning  Goals o Max Throughput o Within Given Latency  How do we know we are at Max? o Does resource consumption is high? o What are the resources - CPU - Memory - IO (Network and Disk) o At last one should max out o E.g. if you have too many locks, all above 3 may be low and you get sub-optimal throughput  We fix problems via profiling o Detective time!!
  • 30. Profiling  First step is connect through JConsole, and get basic idea.  Also monitor the load average, CPU usage, and IO operations (via top or Sar)  Then you can switch to tools like JProfiler, Yourkit  Important views o CPU views (bottlenecks) o Thread views and monitor views o Memory views (GC, allocations, and memory leaks) o IO and JDBC tracing
  • 33. Conclusion  Goals: Optimizing the deployments o Message performance o Reduce footprint  Design and Capacity Planning  Design for Performance and Minimal footprint o Select right transport o Minimize footprint and maximize sharing - MT - Using Carbon o Tuning  We also discussed some of the new performance improvements.