ACID
Definition
Atomicity, Consistency, Isolation, Durability - properties that guarantee database transactions are processed reliably, ensuring data integrity.
Use Cases
- Stripe: Payment processing where charges, refunds, and ledger updates must not double-apply or partially apply. — Stripe’s engineering has discussed using strongly consistent, transactional data storage patterns for financial records, relying on database transactions to ensure operations like creating a charge and updating related records commit together or roll back together. (Helps prevent partial updates and reduces risk of inconsistent financial state, improving reliability and auditability of payment operations.)
- Shopify: E-commerce order creation where inventory, order records, and payment status must remain consistent. — Shopify has publicly described heavy use of relational databases (notably MySQL) and transactional patterns to keep core commerce data consistent during critical workflows like checkout and order processing. (Supports dependable checkout flows and reduces issues like overselling inventory or creating orders with incomplete related data.)
- GitHub: Storing and updating core application data (users, repositories, permissions) with reliable transactional behavior. — GitHub has publicly shared that it uses MySQL for major parts of its data layer, leveraging transactions to ensure multi-step updates (for example, permission changes and related records) are applied reliably. (Improves correctness of core product data and reduces operational incidents caused by partial writes or inconsistent state.)
Frequently Asked Questions
- What’s the difference between ACID and BASE (eventual consistency)?
- ACID focuses on correctness during transactions: changes are all-or-nothing, consistent, isolated from other concurrent work, and durable after commit. BASE systems prioritize availability and scalability and often accept eventual consistency, meaning different replicas may temporarily disagree and converge later. ACID is common in relational databases and financial workflows; BASE is common in large-scale distributed systems where low latency and high availability are prioritized.
- When should I use ACID transactions?
- Use ACID when you can’t tolerate partial updates or inconsistent reads, such as payments, account balances, order processing, inventory reservation, booking systems, and any workflow that must be correct under concurrency. If your workload can tolerate temporary inconsistency (for example, analytics counters, feeds, caching, or log ingestion), you may not need full ACID guarantees everywhere.
- How much does ACID cost?
- ACID itself has no direct price, but stronger transactional guarantees can increase cost through higher resource usage and architectural constraints. Costs are driven by the database/service you choose (managed relational DB vs distributed DB), required throughput and storage, high availability and replication (multi-AZ/region), backup/retention, and performance tuning (indexes, transaction contention). In practice, ACID workloads may require larger instances, faster storage, or more replicas to meet latency and concurrency goals.
Category: data
Difficulty: advanced
Related Terms
See Also