advanced-risk-management-considering-impact-of-message-size-on-stability-of-the-solution
Version 1.1 by marijn on 2022/05/05 16:34
Considering the impact of message size
In this microlearning, we will consider the importance of determining how large messages need to be exchanged. Having this information early on gives you the ability to model your solution in the best way possible to safeguard (as best as possible) against these messages having a detrimental effect on the stability of the complete integration model. Because of the potentially massive impact of one solution on the rest of your model, it is of utmost importance to consider all aspects.Should you have any questions, please get in touch with academy@emagiz.com.- Last update: October 21st, 2021
- Required reading time: 5 minutes
1. Prerequisites
- Advanced knowledge of the eMagiz platform
2. Key concepts
This microlearning centers around considering the impact of message sizeSeveral aspects are relevant when considering message size:- What is the average size of the messages?
- What is the peak size of a message?
- What do you want to do with the message?
- Could the delivering system reduce the message size in some way?
3. Considering the impact of message size
In this microlearning, we will consider the importance of determining how large messages need to be exchanged. Having this information early on gives you the ability to model your solution in the best way possible to safeguard (as best as possible) against these messages having a detrimental effect on the stability of the complete integration model. Because of the potentially massive impact of one solution on the rest of your model, it is of utmost importance to consider all aspects.Several aspects are relevant when considering message size:- What is the average size of the messages?
- What is the peak size of a message?
- What do you want to do with the message?
- Could the delivering system reduce the message size in some way?
- Limited use of 'non-standard' flows. So, are the number of components within a flow comparable to the 'standard' setup (i.e., an autogenerated onramp).
- Average message size of less than 100Kb
- Standard number of consumers
- Use of Java extensions such as Groovy Scripts
- Limited use of complex transformations
- Limited use of Xpath and SpEL expression related to large messages
- Performance tests: Make sure you test on the acceptance environment with a production setup. This is to validate whether your solution holds under the duress of real-life scenarios. One aspect of these performance tests would be a load test to determine the number of messages and the average size of each message that can be handled by the solution built and configured in eMagiz.
- In case the performance test results in issues, you should get back to the drawing board to see how you can improve the platform's stability.
- Set up an efficient integration. When dealing with large messages, it's vital that the messages only go through strictly necessary components. So minimalize complex transformations and connections.
- Investigate the possibilities of using the Event Streaming integration pattern when dealing with high volumes of 'smaller' messages.
- If you exceed the threshold of 1MB and Event Streaming is no option, we strongly advise using the asynchronous messaging pattern compared to a synchronous alternative if this is possible. As the latter consumes more memory.
Practice
4. Assignment
See if you can identify processes that are heavy on memory consumption. This assignment can be completed with the help of the (Academy) project that you have created/used in the previous assignment.5. Key takeaways
- Validate assumptions on message size and what needs to happen with the data early on
- If the assumptions of eMagiz are violated perform your own memory calculations to see what you need
- Always test rigourously on Acceptance especially when dealing with processes that are heavy on memory consumption
- Documentation is key