NOTE
1.6 BASE
BASE trades strong consistency for availability, allowing temporary differences during failures while requiring eventual consistency.
This is a historical learning note and may contain outdated or incomplete understanding.
1. What Is BASE?
- An extension of AP theory.
- It guarantees eventual consistency rather than strong consistency. Since failures are unavoidable, data may temporarily differ, but it must become consistent afterward.
- Availability is obtained by sacrificing strong consistency. When a failure occurs, partial unavailability is allowed, but core functions must remain available.
1.1. Basic Availability
- Basic availability.
- The system may be temporarily unavailable but will recover quickly afterward.
1.2. Soft-state
- Soft state.
- An intermediate state between a “stateful” and a “stateless” service, as described in Distributed-System Service State. In other words, to improve performance, we can let a service temporarily retain some state or data, and that state and data do not have to be strongly consistent.
1.3. Eventual Consistency
Eventual consistency. The system is inconsistent for a short period of time, but the data will eventually become consistent.
2. Flexible Transactions
- Rigid transaction: fully complies with the ACID requirements.
- Flexible transaction: a transaction that follows BASE.
2.1. How to Implement Flexible Transactions
- The core approach is to asynchronously execute distributed processing tasks through a message queue. If the transaction fails, recovery can be attempted through manual retries.
- Distributed Transaction Solution: Saga
3. References
Drag to pan, scroll to zoom, and click a node to expand or collapse it. Large maps start with deeper levels collapsed; click nodes to expand them.
Discussion
Sign in with GitHub to comment. Discussions are stored as GitHub Issues.View on GitHub