Answer the question
In order to leave comments, you need to log in
How to provide fault tolerance and load balancing in services + JMS (messaging bus)?
In the classical implementation of the microservice architecture, services receive a message and process it and spit it out further (stateless). The issues of load sharing and fault tolerance are solved by using queues and running multiple instances of the service. But in practice, we encountered a synchronization problem.
Let's say we have a set of objects that describe the state machine, states and transitions between states. At the moment we have one service which is responsible for handling transitions between states for all objects. When transitioning to a new state, the service sends a message to other microservices. At startup, we unload all objects from the database and run the state machine.
Accordingly, we cannot simply launch 3 instances of the service - all three will subtract the same set of objects and will perform the same transitions - at the output, all three will send 3 identical messages.
Hence a number of questions:
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question