Load balancing, caching, CDNs, sharding, replication, queues, consistent hashing and latency numbers.
40 cards · basic cards · AI-written, checked twice. Edit anything.
- What is the primary goal of load balancing?
Show answer
Distribute incoming traffic evenly across multiple servers to prevent bottlenecks.
- Name three common load balancing algorithms.
Show answer
Round robin, least connections, and weighted round robin.
- What is a health check in load balancing?
Show answer
A periodic test verifying a server is responsive; unhealthy servers are removed from the pool.
- What does sticky sessions mean in load balancing?
Show answer
Routing all requests from the same client to the same backend server, using cookies or IP hashing.
- What is the difference between layer 4 and layer 7 load balancing?
Show answer
Layer 4 routes on IP protocol data; layer 7 inspects HTTP headers and can route by URL path or host.
- What is the cache hit rate?
Show answer
The percentage of data requests satisfied by the cache rather than fetching from slower primary storage.
- Name three common cache eviction policies.
Show answer
LRU (Least Recently Used), LFU (Least Frequently Used), and FIFO (First In, First Out).
- What is cache invalidation?
Show answer
Removing or updating stale data in a cache so clients do not receive outdated information.
- What is a write-through cache?
Show answer
Data is written to both cache and underlying storage simultaneously; guarantees consistency but slower writes.
- What is a write-back cache?
Show answer
Data is written to cache first and flushed to storage later; faster writes but risk of data loss.
- What is cache stampede?
Show answer
When a popular cache item expires, many concurrent requests hit the slow backend simultaneously.
- What does a CDN do?
Show answer
Caches and serves content from servers geographically close to users, reducing latency and bandwidth costs.
- Name two ways a CDN reduces latency.
Show answer
Geographic distribution of edge servers and local caching of popular content.
- What is an edge server?
Show answer
A server located closer to end users that caches and serves copies of content, part of the CDN infrastructure.
- What types of content are best suited for CDN delivery?
Show answer
Static content like images, CSS, JavaScript, and video; anything that changes infrequently.