---
title: "System Design & Architecture: Scalability & Resilience"
description: "Master system design: scalability, reliability, performance, trade-offs, distributed systems patterns, and architectural decisions for production systems."
author: "Mohammad Abu Mattar"
canonical: https://mkabumattar.com/quizzes/post/system-design-architecture-quiz
---

# System Design & Architecture: Scalability & Resilience

Welcome to the System Design & Architecture quiz! Test your knowledge on scalability, reliability, performance, trade-offs, distributed systems patterns, and architectural decisions for production systems. Each question has a timer and hints to guide you. Good luck!

## Questions

### 1. What is scalability in the context of system design?

- **The ability of a system to handle increased load by adding resources** ✅
  - Scalability: handled via vertical (size) or horizontal (count) scaling.
- The measure of how quickly a system responds to an individual request
  - This describes performance or latency, not scalability.
- The percentage of total uptime a system maintains over a given year
  - This refers to availability, often measured in "nines".
- The capacity of a system to automatically recover from a node failure
  - This describes fault tolerance or resilience.

**Hint:** Think about handling growth.

### 2. What is latency?

- **The total time taken for a request to travel from client to server and back** ✅
  - Latency: measured in milliseconds. Lower is better for user experience.
- The number of requests a system can process within a specific timeframe
  - This describes throughput (e.g., Requests Per Second).
- The delay introduced specifically by the database disk-seek operations
  - This is disk latency, only one component of total system latency.
- The variance in response times over a large set of user requests
  - This describes jitter, not the base definition of latency.

**Hint:** Think about response time.

### 3. What is throughput?

- **The volume of work or number of requests processed in a given period** ✅
  - Throughput is typically measured in RPS (Requests) or TPS (Transactions).
- The maximum capacity of a single network link in a distributed cluster
  - This describes bandwidth, which limits but is not throughput.
- The average time a user spends waiting for a page to load completely
  - This is a high-level latency metric from the client perspective.
- The amount of data stored in a database divided by the number of nodes
  - This refers to data density or partitioning balance.

**Hint:** Think about requests per second.

### 4. What is availability?

- **The proportion of time a system remains functional and accessible** ✅
  - Availability is often defined by SLAs (e.g., 99.9% availability).
- The ability of a system to remain consistent during a network partition
  - This describes the "C" in CAP, which often trades off with availability.
- The total number of concurrent users a system can support at peak
  - This describes system capacity or load limit.
- The speed at which a system can reboot after a catastrophic crash
  - This is the Mean Time To Recovery (MTTR).

**Hint:** Think about uptime.

### 5. What is consistency in distributed systems?

- **The requirement that all nodes see the same data at the same time** ✅
  - Consistency ensures that a read following a write returns the new value.
- The guarantee that a system will always return a response to every request
  - This describes availability in the CAP theorem.
- The ability of a database to store data in a strictly normalized format
  - This describes relational normalization, not distributed consistency.
- The process of ensuring that all log files are formatted identically
  - This is a logging standard, not a data consistency model.

**Hint:** Think about data correctness.

### 6. What is partitioning (sharding)?

- **Dividing a large dataset into smaller chunks across multiple nodes** ✅
  - Partitioning enables horizontal scaling by spreading the data load.
- Creating exact copies of the same data across multiple geographic regions
  - This describes replication, not partitioning.
- The process of grouping multiple API requests into a single batch
  - This describes request batching or bulk operations.
- A technique for hiding private database fields from the public API
  - This is data masking or encapsulation.

**Hint:** Think about dividing data.

### 7. What is a single point of failure (SPOF)?

- **Any component whose failure causes the entire system to stop functioning** ✅
  - Eliminating SPOFs through redundancy is key to high availability.
- A bug in the source code that causes a single request to fail
  - This is an isolated error, not necessarily a system-wide SPOF.
- The primary bottleneck that limits the total throughput of the system
  - A bottleneck limits speed; a SPOF causes total system cessation.
- A hardware node that only processes one type of transaction at a time
  - This describes a serial processor or a specialized worker.

**Hint:** Think about critical dependencies.

### 8. What is eventual consistency?

- **A model where data will be consistent across all nodes given enough time** ✅
  - Eventual consistency allows for temporary divergence to favor availability.
- A consistency model that guarantees immediate updates to all replicas
  - This describes strong consistency (linearizability).
- A database feature that prevents any data from ever being overwritten
  - This refers to immutability or append-only logs.
- A guarantee that a system will never return a stale read under any load
  - Eventual consistency specifically allows for stale reads temporarily.

**Hint:** Think about delayed consistency.

### 9. What is CQRS (Command Query Responsibility Segregation)?

- **An architectural pattern that uses different models for reading and writing data** ✅
  - CQRS allows for independent optimization of read and write workloads.
- A protocol for ensuring that every database write is encrypted at rest
  - This is a security standard, not a structural pattern like CQRS.
- A method for merging multiple microservices into a single deployment
  - This is the opposite of service decomposition or microservices.
- A strategy for caching API queries based on the user identity
  - This is identity-based caching or authorization-aware caching.

**Hint:** Think about separate read/write.

### 10. What is event sourcing?

- **A pattern that stores the state of a system as a sequence of immutable events** ✅
  - The current state is derived by replaying the history of events.
- A technique for triggering serverless functions based on user clicks
  - This describes event-driven execution or FaaS triggers.
- A method for logging application errors to a centralized dashboard
  - This is error tracking or centralized logging.
- A way to automatically generate unit tests from production logs
  - This describes record-and-replay testing tools.

**Hint:** Think about storing events.

### 11. What is rate limiting?

- **The practice of controlling the rate of requests sent or received by a network** ✅
  - Rate limiting protects resources from abuse and ensures fair usage.
- A mechanism that automatically increases server capacity during high traffic
  - This describes auto-scaling, not rate limiting.
- A compression technique used to reduce the size of large API payloads
  - This describes payload compression (e.g., Gzip).
- The process of assigning priorities to different types of database queries
  - This describes query prioritization or Quality of Service (QoS).

**Hint:** Think about controlling traffic.

### 12. What is bulkhead isolation?

- **A pattern that partitions resources to prevent a failure in one from affecting others** ✅
  - Bulkheads isolate faults, ensuring that one service crash doesn’t sink the whole system.
- A security strategy that places all database servers behind a secondary firewall
  - This is a network perimeter defense or "defense in depth".
- A method for encrypting data as it travels between internal microservices
  - This describes Transport Layer Security (mTLS).
- The practice of storing all backup files on a physical off-site hard drive
  - This is a disaster recovery strategy, specifically off-site backup.

**Hint:** Think about fault boundaries.

### 13. What is the circuit breaker pattern?

- **A mechanism to stop requests to a failing service to allow it to recover** ✅
  - It uses Open, Half-Open, and Closed states to manage service health.
- A software tool that automatically restarts a server when it runs out of RAM
  - This is an orchestration monitor or an OOM killer handler.
- A design rule that requires every function to have a try-catch block
  - This is an error-handling coding standard, not a structural pattern.
- A load balancing algorithm that redirects traffic to the fastest available node
  - This describes "Least Response Time" load balancing.

**Hint:** Prevent cascading failures?

### 14. What is the CAP theorem?

- **The principle that a distributed system can only provide two of three specific guarantees** ✅
  - System designers must choose between C, A, and P during a network partition.
- A law stating that the speed of a system is limited by its slowest component
  - This describes Amdahl’s Law or the Theory of Constraints.
- A requirement that all cloud providers must maintain three copies of user data
  - This describes a common durability policy (Triple Replication).
- The rule that an API must respond within 100ms to be considered "high performance"
  - This is an arbitrary performance target, not the CAP theorem.

**Hint:** Consistency, Availability, Partition tolerance trade-offs?

### 15. What is the BASE model?

- **A model focusing on availability and eventual consistency over strict ACID rules** ✅
  - BASE: Basically Available, Soft state, Eventually consistent. Common in NoSQL.
- A set of rules ensuring that every transaction is Atomic, Consistent, Isolated, and Durable
  - This describes the ACID model, which is the opposite of BASE.
- A standard for building APIs that only return data in a binary-serialized format
  - This refers to protocols like Protobuf or Avro.
- A database design where all tables are derived from a single "Base" table
  - This refers to Table Inheritance or a specific relational schema.

**Hint:** Basically Available, Soft state, Eventually consistent?

### 16. What is database sharding?

- **The horizontal partitioning of data across multiple independent database instances** ✅
  - Sharding helps scale out databases that have become too large for one server.
- The process of combining small tables into one large table to reduce joins
  - This describes denormalization or flattening.
- A method for compressing database indexes to save on-disk storage space
  - This is index compression, not sharding.
- Creating read-only copies of a database to handle high query volume
  - This describes read replication.

**Hint:** Partition data horizontally?

### 17. What is database denormalization?

- **Adding redundant data to a schema to improve read performance by avoiding joins** ✅
  - Denormalization trades write complexity and storage for faster reads.
- Removing all duplicate fields from a table to ensure data integrity
  - This describes normalization (e.g., 3rd Normal Form).
- The process of converting a relational database into a NoSQL document store
  - This is a database migration, not specifically denormalization.
- A security practice where sensitive data is replaced with random tokens
  - This describes tokenization or pseudonymization.

**Hint:** Duplicate data for query performance?

### 18. What is the Cache-Aside strategy?

- **A pattern where the application code is responsible for managing the cache state** ✅
  - The app checks the cache; on a miss, it hits the DB and updates the cache.
- A strategy where the database automatically updates the cache on every write
  - This describes Write-Through or Write-Behind caching.
- A method of caching that only stores data for the duration of a single user session
  - This describes session-based caching.
- A hardware-level cache that sits directly between the CPU and the system RAM
  - This is an L1/L2/L3 hardware cache.

**Hint:** When to populate and flush cache?

### 19. What are Bloom Filters?

- **A space-efficient probabilistic data structure used to test if an element is in a set** ✅
  - They can return false positives but never false negatives.
- A type of filter used to remove duplicate entries from a distributed log
  - Logs use deduplication logic; Bloom filters only test for membership.
- A specialized algorithm for compressing high-resolution images for the web
  - Bloom filters are for set membership, not image compression.
- A security mechanism that blocks incoming traffic from suspicious IP ranges
  - This is an IP blacklist or Firewall rule.

**Hint:** Probabilistic set membership test?

### 20. What is consistent hashing?

- **A hashing technique that minimizes key remapping when the number of slots changes** ✅
  - Essential for distributed caches like Redis to prevent mass cache invalidation.
- A requirement that all nodes in a cluster use the exact same hashing algorithm
  - This is a general requirement for any cluster, not "consistent hashing".
- A method for ensuring that a hash value never changes even if the input data changes
  - This is impossible by the definition of a hash function (unless it is a constant).
- A security protocol that verifies the hash of a file before it is executed
  - This describes checksum verification or code signing.

**Hint:** Distribute cache keys with minimal remapping?

### 21. What is the Saga pattern?

- **A sequence of local transactions where each updates data and triggers the next** ✅
  - Sagas manage distributed transactions using compensation logic if a step fails.
- A monolithic database transaction that locks all tables until completion
  - This is a global lock, which Sagas are specifically designed to avoid.
- A storytelling technique used by architects to explain system requirements
  - While "Saga" is a term in literature, in architecture it is a transaction pattern.
- A load testing tool that simulates millions of users over a long duration
  - This describes a soak test or a stress testing tool.

**Hint:** Coordinate multi-service transactions?

### 22. What is the difference between Token Bucket and Leaky Bucket?

- **Token Bucket allows for bursts of traffic, while Leaky Bucket enforces a steady rate** ✅
  - Token bucket allows bursts if tokens have accumulated; leaky bucket smooths output.
- Leaky Bucket is used for hardware, while Token Bucket is used for software
  - Both are algorithmic concepts applicable to hardware and software.
- Token Bucket consumes more memory than Leaky Bucket due to token storage
  - Both are very memory-efficient and have similar overhead.
- Leaky Bucket allows for priority-based requests, while Token Bucket does not
  - Both can be adapted for priority, but it is not their defining difference.

**Hint:** Control request rate and burst capacity?

### 23. What is Hexagonal Architecture?

- **A pattern that isolates core logic from external concerns using ports and adapters** ✅
  - It allows the system to be equally driven by users, programs, or automated tests.
- A network topology where every server is connected to exactly six other servers
  - This describes a mesh network or a specific graph topology.
- A database schema where every table has exactly six defined relationships
  - This is an arbitrary relational constraint, not an architecture.
- A project management style that organizes developers into six-person squads
  - This refers to the "Two-Pizza Team" or "Squad" model, not architecture.

**Hint:** Core logic isolated from external dependencies?

### 24. What are Bounded Contexts in DDD?

- **Explicit boundaries within which a specific domain model is defined and applicable** ✅
  - They prevent models from becoming over-complicated by separating concerns.
- A limit on the number of microservices that can belong to a single team
  - This is a team-scaling limit, not a DDD concept.
- A technical constraint that prevents a database from growing beyond a certain size
  - This is a storage quota or capacity limit.
- The scope of a single transaction within a relational database system
  - This is an ACID transaction scope.

**Hint:** Separate domain models by boundaries?

### 25. What are the three pillars of Observability?

- **Logs, Metrics, and Traces** ✅
  - Together they provide a comprehensive view of a system’s internal state.
- Uptime, Latency, and Throughput
  - These are the three primary performance metrics, not pillars of observability.
- Compute, Storage, and Networking
  - These are the three pillars of cloud infrastructure.
- Alerts, Dashboards, and Reports
  - These are the outputs of a monitoring system.

**Hint:** Understand system behavior via three pillars?

### 26. When is a Time-Series Database (TSDB) most appropriate?

- **For handling massive volumes of timestamped data like metrics or sensor readings** ✅
  - TSDBs like InfluxDB are optimized for time-based range queries and aggregation.
- For storing complex relational data with many many-to-many relationships
  - Relational databases or Graph databases are better for this.
- For managing high-speed transactional data in a banking application
  - RDBMS with strong ACID compliance is usually preferred for banking.
- For hosting static assets like images and videos for a global audience
  - This describes a Content Delivery Network (CDN) or Object Storage.

**Hint:** High-volume timestamp data patterns?

### 27. What is Semantic Versioning (SemVer)?

- **A versioning scheme using MAJOR.MINOR.PATCH to signal the nature of changes** ✅
  - MAJOR signals breaking changes, MINOR signals features, PATCH signals fixes.
- A way of naming software versions after famous scientists or cities
  - This is a codename strategy, not semantic versioning.
- A requirement that all API versions must be written in a specific human language
  - SemVer refers to the numeric format, not natural language.
- A method for versioning database rows using a timestamp column
  - This is Row Level Versioning or Optimistic Concurrency Control.

**Hint:** Breaking changes and backward compatibility?

### 28. What is an idempotency key?

- **A unique value sent by a client to ensure a request is only processed once** ✅
  - If the server receives a second request with the same key, it returns the cached result.
- A secret key used to sign API requests for security and authentication
  - This describes an API Key or an HMAC signature.
- A primary key in a database that is generated using a random number
  - This is a UUID or a surrogate key.
- A key used to compress repetitive data in a JSON payload
  - This refers to dictionary-based compression.

**Hint:** Prevent double-charging on retries?

### 29. Why is Average Latency often a misleading metric?

- **It hides outliers (tail latency) that significantly affect user experience** ✅
  - Percentiles like p99 show the experience of the slowest 1% of users.
- It is mathematically impossible to calculate an average in distributed systems
  - Averages are easy to calculate but provide an incomplete picture.
- It requires significantly more CPU power to calculate than the median
  - Calculating the average is actually much cheaper than calculating percentiles.
- It only considers successful requests and ignores all failed ones
  - While this can happen, it is a flaw in reporting, not the nature of an average.

**Hint:** Why average is misleading?

### 30. What is Distributed Consensus (e.g., Raft)?

- **An algorithm for achieving agreement on a single data value across a cluster** ✅
  - Consensus algorithms like Raft or Paxos ensure fault-tolerant state machines.
- A method for distributing load equally across all web servers in a region
  - This describes Load Balancing.
- A legal agreement between cloud providers to share user data in emergencies
  - Consensus in this context is a technical algorithm, not a legal one.
- A technique for reducing the total size of a distributed database
  - This describes data pruning or compression.

**Hint:** Achieve agreement across replicas?
