+49 228 5552576-0


info@predic8.com

Beer explains ESB Performance

Why a lot of traditional ESB products have a slow latency can be explained with a Kölsch beer.

Figure 1 illustrates how a message flows through an ESB. An adapter receives a message and puts it onto the bus. Then the bus passes the message to an ESB component, for instance a router. The message travels from component to component over the bus. Each time the message is written to the bus and read from the bus.


Figure1: Message flow in a traditional ESB

Before the bus can pass on a message to the next component, it must read it entirely. Figure 2 displays the Kölsch entirely read by the IN quene of the HTTP adapter.


Figure2: Kölsch is read by the HTTP Adapter

First an Adapter passes the message to a router using a message queue in memory storage.

Figure3: Passing the Kölsch to the Router

After some time the message is completely written to the router queue in permanent storage or memory.

Figure4: Kölsch is in Router IN

Next the router reads the message from router in makes a routing decision and writes it to the routing destination of the router out queue.

Figure5: Kölsch is in Router OUT

And finally the message arrives at HTTP Adapter out. The HTTP adapter will also read the message and write it onto the network.

Figure6: Kölsch at HTTP Adapter OUT


Figure7: Kölsch Transport to the final Destination

Now let’s have a look at the message passing in a synchronous ESB like Membrane:

The messages flow just through the ESB without coping or memory storage. That’s the reason why a message flowing through Membrane ESB can be much bigger than the memory allocated for the ESB. The delay caused by the ESB is neglectable. For a 10kB message it is less than 1 ms even on slow hardware. Question: What about the transformation? You are correct. If you use a transformation or an other feature like a WSDL validation Membrane ESB has to read the whole message into memory. But Membrane only does this when necessary. Let’s have a look again at the example. This setup is much slower because the message has to be put in memory two times. But it is still better than a traditional ESB needing six copies.