- Consistency (C): Every read receives the most recent write or an error.
- Availability (A): Every non-failing node returns a non-error response (without guarantee of latest data).
- Partition Tolerance (P): System continues operating despite network dropped/delayed messages.
System Design - Distributed Systems & Scalability
Cards in this deck
(20 cards)Preview terms and definitions before starting your study session.
- If Partition (P): Choose between Availability (A) or Consistency (C).
- Else (E): Choose between Latency (L) or Consistency (C).
- Vertical Scaling (Scale Up): Adding hardware power (CPU, RAM) to a single machine. Simpler architecture, but limited by physical hardware limits and creates a single point of failure (SPOF).
- Horizontal Scaling (Scale Out): Adding more machine nodes to a resource pool. Offers near-unlimited scalability and high fault tolerance, but introduces complexity with network latency, data partitioning, and consistency management.
hash(key) % 2^32). A key is assigned to the first node encountered moving clockwise.user_id).Challenges:
- Cross-shard JOINs: Extremely slow and complex.
- Hotspotting: Poor shard key choice leads to unbalanced traffic on a single shard.
- Resharding Complexity: Re-balancing data as storage needs grow is operationally difficult.
- Read critical user writes directly from the Primary Node (e.g., user reading their own updated profile).
- Enforce Strong Quorum Consistency ().
- Route reads to replicas only after a minimum timestamp/log offset has been reached.
2. Cache Hit: Data is returned immediately to the client.
3. Cache Miss: Application queries the primary database, populates the cache with the fetched result, and returns data to client.
Cons: Initial cache miss penalty; risk of stale cache if DB updates bypass invalidation.
- Write-Through: Application writes to cache, and the cache synchronously writes to the DB before returning success. Low write performance, but ensures zero stale cache reads.
- Write-Back: Application writes to cache, which acknowledges immediately. The cache asynchronously flushes batched writes to DB. Provides ultra-low write latency, but risks data loss if cache nodes crash before flushing.
Related Flashcard Sets
Explore similar study materials created by the community
Series 7 Exam - Options Strategies & Municipal Securities
Master key Series 7 Exam concepts with high-yield flashcards covering options calculations, straddles, spreads, tax-equivalent yield, and FINRA/MSRB regulations. Designed for maximum retention and exam-day success.
Neuroscience - Action Potentials & Synaptic Transmission
Master the biophysical foundations of neurophysiology with high-yield flashcards covering the Nernst and GHK equations, action potential kinetics, ion channel mechanics, and synaptic transmission.
USMLE Step 1 - Cardiovascular Physiology & Pathology
Master high-yield cardiovascular concepts for USMLE Step 1 with this comprehensive flashcard deck, covering hemodynamics, congenital defects, ischemic heart disease, and key pharmacology. Ace your exam with essential equations, pressure-volume loops, ECG interpretations, and murmur presentations.
MIT 6.033 - Computer System Engineering
Master core computer system engineering principles from MIT 6.033, covering modularity, thread synchronization, RPCs, fault tolerance, WAL/ARIES, 2PC, and threat modeling.