What does scalability mean?
- A. Ability of a system to handle growing load (correct)
- B. Making a system look bigger
- C. Reducing the number of users
- D. Encrypting all data
What is the main role of a load balancer?
- A. Store user data
- B. Distribute incoming traffic across multiple servers (correct)
- C. Compile source code
- D. Encrypt passwords
What is horizontal scaling?
- A. Adding more RAM to one server
- B. Upgrading the CPU of one server
- C. Adding more machines to share the load (correct)
- D. Reducing server count
What is the main purpose of caching?
- A. Increase disk storage
- B. Encrypt data
- C. Delete old data
- D. Reduce latency by serving frequently used data quickly (correct)
What does CDN stand for?
- A. Central Data Node
- B. Content Delivery Network (correct)
- C. Cloud Database Network
- D. Compressed Data Namespace
Which of these is a relational (SQL) database?
- A. MongoDB
- B. Redis
- C. PostgreSQL (correct)
- D. Cassandra
What is latency?
- A. Total storage capacity
- B. Number of users online
- C. Number of servers
- D. Time taken for a request to receive a response (correct)
What are the three properties in the CAP theorem?
- A. Cache, Availability, Performance
- B. Consistency, Availability, Partition tolerance (correct)
- C. Concurrency, Atomicity, Persistence
- D. Capacity, Access, Protocol
What is database sharding?
- A. Backing up a database
- B. Encrypting a database
- C. Splitting data across multiple databases (correct)
- D. Deleting duplicate rows
What is a key benefit of a message queue?
- A. Faster CPU speed
- B. Larger storage
- C. Better UI design
- D. Asynchronous communication that decouples services (correct)
Which of these is a rate-limiting algorithm?
- A. Quick sort
- B. Token bucket (correct)
- C. Dijkstra
- D. Merge sort
What is a single point of failure?
- A. A component whose failure brings down the whole system (correct)
- B. The fastest server
- C. A backup database
- D. A load balancer pair
What is database replication?
- A. Deleting old data
- B. Compressing tables
- C. Copying data to multiple nodes for availability and reads (correct)
- D. Renaming tables
REST APIs are typically:
- A. Stateful
- B. Stateless (correct)
- C. Binary only
- D. Connection-persistent
Which cache eviction policy removes the least recently used item first?
- A. FIFO
- B. MRU
- C. LRU (correct)
- D. Random
What does eventual consistency mean?
- A. Data is always instantly consistent
- B. Replicas converge to the same value if no new updates occur (correct)
- C. Data is never consistent
- D. Only one replica exists
What problem does consistent hashing solve?
- A. Password storage
- B. Image compression
- C. Slow queries
- D. Minimizing data movement when nodes are added or removed (correct)
Which pattern helps prevent cascading failures between services?
- A. Circuit breaker (correct)
- B. Singleton
- C. Observer
- D. Factory
What does a write-through cache do?
- A. Writes only to the cache
- B. Writes to the database after a long delay
- C. Writes to both cache and database synchronously (correct)
- D. Never writes data
During a network partition, a CP system chooses to:
- A. Sacrifice availability to keep consistency (correct)
- B. Sacrifice consistency to keep availability
- C. Sacrifice partition tolerance
- D. Sacrifice durability
What is a server?
- A. A computer that provides services or data to other computers (correct)
- B. A type of cable
- C. A web browser
- D. A keyboard
What is a client in client-server architecture?
- A. A network switch
- B. The server's owner
- C. The device or program that requests services from a server (correct)
- D. A database
What is an API?
- A. A web browser
- B. A programming language
- C. A defined way for programs to communicate with each other (correct)
- D. A type of database
What is vertical scaling?
- A. Removing servers
- B. Adding more power (CPU, RAM) to one machine (correct)
- C. Splitting a database
- D. Adding more machines
What is availability?
- A. The speed of a system
- B. The percentage of time a system is up and working (correct)
- C. The size of the database
- D. The number of users
What does 99.9% availability allow per year roughly?
- A. About 1 month
- B. About 3 days
- C. About 8.8 hours of downtime (correct)
- D. About 1 minute
What is throughput?
- A. The delay of one request
- B. The disk size
- C. The amount of work a system handles per unit of time (correct)
- D. The number of servers
What is a database index used for?
- A. Backing up data
- B. Deleting old rows
- C. Encrypting data
- D. Speeding up queries (correct)
What is a monolith?
- A. An application built and deployed as one single unit (correct)
- B. Many small services
- C. A type of database
- D. A load balancer
What are microservices?
- A. An application split into small, independently deployable services (correct)
- B. A tiny server
- C. One big service
- D. A database table
Which of these is a NoSQL database?
- A. MySQL
- B. Oracle Database
- C. PostgreSQL
- D. MongoDB (correct)
Which of these is commonly used as an in-memory cache?
- A. Redis (correct)
- B. Nginx
- C. Git
- D. PostgreSQL
What does a reverse proxy do?
- A. Sends emails
- B. Blocks all traffic
- C. Stores files
- D. Sits in front of servers and forwards client requests to them (correct)
What is a stateless service?
- A. One that never changes
- B. One with no database
- C. One without an API
- D. One that keeps no client session data between requests (correct)
Why are stateless services easier to scale horizontally?
- A. They need no network
- B. Any instance can handle any request (correct)
- C. They use less code
- D. They never fail
What is a cache hit?
- A. The data is deleted
- B. The requested data is found in the cache (correct)
- C. The cache is full
- D. The cache crashes
What is cache invalidation?
- A. Removing or updating cached data when the source changes (correct)
- B. Encrypting the cache
- C. Restarting the cache
- D. Filling the cache
What is TTL in caching?
- A. The type of data stored
- B. How long an item stays in the cache before it expires (correct)
- C. The total cache size
- D. The number of hits
What is the cache-aside pattern?
- A. Writes go only to the cache
- B. The cache is never used
- C. The database writes to the cache directly
- D. The app reads from the cache and loads from the database on a miss (correct)
What is master-slave (primary-replica) replication used for?
- A. Encrypting data
- B. Reducing storage
- C. Faster writes on every node
- D. Scaling reads and providing redundancy (correct)
What is a read replica?
- A. A backup tape
- B. A cache
- C. A copy of the database that serves read queries (correct)
- D. A log file
What is replication lag?
- A. A full disk
- B. The delay before changes on the primary appear on replicas (correct)
- C. Slow network cables
- D. A failed backup
What is a CDN mainly used for?
- A. Running databases
- B. Sending emails
- C. Serving static content from servers close to users (correct)
- D. Compiling code
What does a message broker such as Kafka or RabbitMQ do?
- A. Stores web pages
- B. Passes messages between producers and consumers asynchronously (correct)
- C. Encrypts traffic
- D. Balances CPU load
What is the publish-subscribe pattern?
- A. A client polls a server
- B. Two servers share a database
- C. Publishers send messages to topics and all subscribers receive them (correct)
- D. A user subscribes to email
What is idempotency in an API?
- A. The request is cached
- B. The request is very fast
- C. The request needs authentication
- D. Repeating the same request has the same effect as doing it once (correct)
Which HTTP method should be idempotent by definition?
- A. POST
- B. PUT (correct)
- C. CONNECT
- D. PATCH always
What is a health check?
- A. A doctor's visit
- B. A security audit
- C. A code review
- D. A periodic request to see if a service is working (correct)
What is round-robin load balancing?
- A. Sending all traffic to one server
- B. Sending each new request to the next server in turn (correct)
- C. Sending to the closest datacenter only
- D. Choosing a random user
What is an API gateway?
- A. A frontend framework
- B. A single entry point that routes requests to backend services (correct)
- C. A database
- D. A firewall only
What is rate limiting?
- A. Limiting the database size
- B. Compressing responses
- C. Making the server faster
- D. Restricting how many requests a client can make in a period (correct)
What is the purpose of a unique ID generator in distributed systems?
- A. Encrypting passwords
- B. Creating IDs that never collide across many servers (correct)
- C. Counting users
- D. Naming servers
What is a URL shortener's core operation?
- A. Compressing web pages
- B. Redirecting emails
- C. Encrypting URLs
- D. Mapping a short code to a long URL (correct)
What is the difference between strong and eventual consistency?
- A. Eventual consistency is always faster to write and read correctly
- B. Strong consistency returns the latest write; eventual consistency may return stale data briefly (correct)
- C. Strong consistency loses data
- D. They are identical
What is a quorum in distributed databases?
- A. A backup node
- B. The minimum number of nodes that must agree on a read or write (correct)
- C. The total number of nodes
- D. The leader node
With N replicas, which condition on R and W ensures reads see the latest write?
- A. R + W > N (correct)
- B. R + W < N
- C. R = W = 1
- D. R > N
What is leader election?
- A. Picking the fastest server for a request
- B. Voting by users
- C. Choosing a database type
- D. Choosing one node to coordinate the others (correct)
What is the purpose of the Raft or Paxos algorithm?
- A. Compressing files
- B. Load balancing
- C. Reaching consensus among distributed nodes (correct)
- D. Sorting data
What is a write-back (write-behind) cache?
- A. Writes go to the cache first and are saved to the database later (correct)
- B. Writes skip the cache
- C. The cache is read-only
- D. Writes go to both at once
What is the thundering herd problem?
- A. Too many servers start together
- B. A slow disk
- C. A network storm
- D. Many clients hit the backend at once, for example when a popular cache key expires (correct)
What is the purpose of a dead-letter queue?
- A. Speeding up delivery
- B. Encrypting messages
- C. Holding messages that could not be processed after retries (correct)
- D. Deleting old messages
What is backpressure?
- A. A cache miss
- B. A way for a slow consumer to signal producers to slow down (correct)
- C. Network congestion
- D. A failed write
What does a bloom filter tell you?
- A. The exact count of items
- B. The order of items
- C. Whether an item is definitely not in a set or possibly in it (correct)
- D. The size of items
What is the saga pattern used for?
- A. Caching data
- B. Load balancing
- C. Logging errors
- D. Managing a transaction that spans several services with compensating actions (correct)
What is CQRS?
- A. Separating the models for reading data and writing data (correct)
- B. A replication method
- C. A cache algorithm
- D. A type of SQL query
What is event sourcing?
- A. Storing state changes as an append-only log of events (correct)
- B. Sourcing data from users
- C. Sending events by email
- D. Logging errors only
What is a hot partition (hot shard)?
- A. A deleted shard
- B. A shard receiving far more traffic than the others (correct)
- C. A shard that overheats
- D. A new shard
What is exponential backoff?
- A. Retrying immediately forever
- B. Doubling the number of servers
- C. Waiting longer after each failed retry (correct)
- D. Reducing timeouts
Which component would you use to fan out notifications to millions of users?
- A. A message queue with many worker consumers (correct)
- B. A single cron job on one server
- C. A CDN only
- D. A larger database
What does a geohash or quadtree help with?
- A. Encrypting coordinates
- B. Sorting users by name
- C. Compressing images
- D. Finding nearby locations efficiently (correct)