Distributed systems is the opposite of a single node (ie computer).
In a distributed application, different pieces of the app are called “services.”
A service for:
- storing application data in a database,
- image transcoding in the background (after a user uploads something)
- for the front-end
- How do we divide the work across machines (network latency), data locality (moving data may be very expensive),
dealing with failures. If a server fails on average every three years, with 10,000 nodes in our cluster we'll see 10 faults per day.
The simplest solution is to just launch another task, either on that machine if it's recovered, or on another machine.
dealing with stragglers (much more common than failure). (Nodes|Task) that have not failed, but are just running very slowly.
The simplest solution is to launch another task (on a different machine if needed) and then kill the original task.
The Two-Phase Commit is fairly standard for synchronous processing in order to avoid inconsistent state in a distributed environment.
With the CAP theorem in minde, distributed system has two priority strategy:
- Submit (commit) locally: queue and manage your jobs task locally, leverage your local resources
- Run Globally: Acquire any resource that is capable and willing to run your job/task