Distributed System¶
The Internet is the biggest distributed system in the world.
Concerns for Remote Services¶
- Where are the remote services located? (Service Discovery)
- How many instances of the service are there, and how should traffic be distributed among them? (Load Balancing)
- What actions should be taken if there are network timeouts, partition failures, or service errors? (Fault Tolerance: e.g., Circuit Breaker, Isolation, Fallback)
- How should remote methods, including arguments and return values, be represented? (Communication Protocols: e.g., Serialization and Protocol)
- How should permissions for accessing the services be managed? (Authentication & Authorization)
- How can communication be secured? (Network Security)
- How can consistent results be ensured across multiple service instances? (Distributed Data Consistency)
Eight Classic Fallacies¶
- The network is reliable;
- Latency is zero;
- Bandwidth is infinite;
- The network is secure;
- Topology doesn't change;
- There is one administrator;
- Transport cost is zero;
- The network is homogeneous.
CAP-Theorem¶
In a distributed system, it is impossible to guarantee the three properties of Consistency, Availability, and Partition Tolerance at exactly the same time.
You can choose two of them for a specific system or scenario, for example:
AP – Domain Name System (DNS).
CA – Relational Database Management System (RDBMS).
CP – Banking Application.
BASE - BA:Basic Available; S:Soft State; E:Eventual Consistency
Distributed Transaction¶
TODO