Performance & Scalability interview question · Most asked
How do you approach a performance problem methodically?
Summary
Define the goal and measure (which metric, which percentile, under what load), reproduce, profile to find where time is actually spent (traces, CPU/memory profilers, query analysis), fix the biggest bottleneck, and re-measure, repeating until the goal is met.
Longer Answer
Avoid optimizing by intuition. Common culprits: database queries (N+1, missing indexes), external calls in series, chatty network round trips, serialization of big payloads, lock contention, GC pressure and synchronous work that could be async or cached.
Key Points
- Set measurable goals
- Profile, don't guess
- Fix the biggest bottleneck
- Re-measure
More most-asked Performance & Scalability questions
- What is the difference between vertical and horizontal scaling?
- What's the difference between latency and throughput?
- How do load balancers work, and what algorithms do they use?
- Why are timeouts, retries and circuit breakers essential for performance and reliability?
- What are the most common database-related performance problems?