Interview Q&A · questions with model answers
Performance & Scalability Interview Questions
Part of the study plan for: Site Reliability Engineer (SRE) · Backend Engineer · Frontend Engineer
Ordered by how often they're asked. Most-asked answers are free to read in full; members see every answer and can rate their confidence on each.
-
Most asked How do load balancers work, and what algorithms do they use?
Load balancers distribute requests across healthy backends using algorithms like round robin, least connections, weighted, or consistent hashing (for affinity), and remove unhealthy instances using…
-
How does autoscaling work and what are its pitfalls?
Autoscaling adds or removes instances based on metrics (CPU, request rate, queue depth, latency) or schedules. Pitfalls: slow startup lagging behind spikes, scaling on the wrong metric, oscillation…
-
How does a CDN improve performance?
A CDN caches content at edge locations near users, reducing latency and origin load; it also terminates TLS close to users, optimizes routing, compresses and optimizes assets, and absorbs traffic…
-
How can garbage collection affect application performance?
GC pauses add latency spikes (especially stop-the-world phases), and high allocation rates increase GC frequency and CPU usage. Memory leaks grow heaps until GC thrashes or the process is killed.
-
How can moving work to background jobs improve performance?
Responses return as soon as the essential work is done, while slow or non-critical tasks (emails, thumbnails, webhooks, analytics) run asynchronously in workers, lowering request latency and…
-
How can serialization become a bottleneck?
Converting large objects to JSON (and parsing them) is CPU-intensive, blocks event loops for big payloads, and allocates memory. Fix with smaller payloads, faster serializers (orjson, simdjson),…
-
How do algorithm and data structure choices affect backend performance?
Using the right structures (hash maps for lookups, sets for membership, heaps for top-k, indexes for range queries) avoids accidental O(n²) behavior that only appears at production data sizes.