Performance Tuning In Mule ESB


In this article, I would brief on tuning mule application through threading profile. Fine tuning can be performed at various stages.
  1. Design Phase Tuning
    1. Tune Mule’s flows.
    2. Tune Mule’s configuration settings.
  2. Runtime Environment Tuning
    1. Tune the Java Virtual Machine (JVM). Xmx, Xms
    2. Tune the garbage collection (GC) mechanism. CMS for API’s
  3. Operating System Tuning
    1. Tune the ulimit.
    2. Tune the TCP/IP stack.
Tune Mule’s configuration settings:- Conceptually, messages are processed by flows in three stages:
  • The message being received by the inbound connector
  • The message being processed
  • The message being sent via an outbound connector
Synchronous processing, the same thread is used to carry the message all the way through Mule.

Asynchronous processing, the receiver thread is used only to place the message on a staged event-driven architecture (SEDA) queue, at which point the message is transferred to a flow thread, and the receiver thread is released back into the receiver thread pool so it can carry another message.

Mule Design time tuning 
Threads in Mule:

  • The receiver thread, which originally receives the message, either:
    • Processes the entire flow (synchronous), or Ends by writing the message to a SEDA queue (asynchronous)
  • The flow thread, which processes the bulk of the flow (asynchronous)
  • Dispatcher threads, which send messages to one-way endpoints (asynchronous)
Threading Profile Configuration
  • Configuration level 
  • Connector level 
  • Flow level Flow-Processing Strategies
Configuration Level Threading Profile Setting:-
Default Threading Profile
Connector level:-
VM transport is an excellent mechanism to help break your flows into smaller, composite flows that are decoupled with in-memory queuing. This allows you to realize the benefits of SEDA at the macro level, breaking your application into smaller flows that can be individually tuned and are decoupled with VM queuing.
Flow level Flow | Processing Strategies:-

No comments:

Post a Comment

Note: only a member of this blog may post a comment.