NOTE
1.6 BASE
1. What Is BASE - An extension of AP theory. - It guarantees eventual consistency rather than strong consistency. That is, because failures are unavoidable, I allow data to be different during this period, but after this period the data needs to be consistent. - Availability is obtained by sacrificing strong consistency. When a failure occurs, partial unavailability is allowed, but core functions must remain available.
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. That is, because failures are unavoidable, I allow data to be different during this period, but after this period the data needs to be consistent.
- 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 follows the ACID specification.
- Flexible transaction: a transaction that satisfies BASE theory is a flexible transaction.
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, a manual retry correction process can be initiated.
- Distributed Transaction Solution: Saga
Discussion
Sign in with GitHub to comment. Discussions are stored as GitHub Issues.View on GitHub