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:
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:
First an Adapter passes the message to a router using a message queue in memory storage.
Figure3:
Figure4:
Figure5:
Figure6:
Figure7:
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.