Introduction to distributed system problems
In microservice applications, there can be scenarios where multiple services need to coordinate their actions to perform some types of tasks. Let’s imagine that we have a collection of large video files (for example, on a network drive within our system) and we want to build service logic for processing these files by converting them from one format to another. To avoid duplicate work, we want to coordinate the execution of processing tasks so that not more than one service instance processes the same data at each moment in time.
One way to tackle such a problem is to introduce some logic that would orchestrate the execution of such tasks (for example, a separate component that would select a random service instance and assign it some specific work to do). However, such an approach has some challenges:
- Centralization and single point of failure: Orchestration logic would become “centralized” within another...