Mule Flow Variable vs Session Variable Performance

mule, mule-el, mule-studio

Solution

Session variables are constantly serialized and deserialized when messages cross transport boundaries.

But, you're saying that you can use flow or session variables interchangeably in your project so it means you don't have any transport boundary (otherwise you would lose the flow variables).

In that case, both flow and session variables perform the same: they're just properties of the event.

Note that session variables tend to get leaked via HTTP endpoints so be careful with their usage.

Problem

Besides the functionality differences between flow variable and session variable as described in Mulesoft page, are there any significant performances differences to note while using the two? For my project, using flow and session variables work perfectly fine. Therefore, I need to decide on which to use.

Original source