categories.performance Intermediate
Backend Performance Profiling Techniques
Explain how to identify backend performance bottlenecks.
Profiling Process
- Measure: Establish a baseline and confirm the problem exists.
- Profile: Identify hot spots — which code paths or queries consume the most time.
- Optimize: Address the biggest bottleneck first.
- Verify: Re-measure to confirm the improvement.
Tools
APM (Application Performance Monitoring)
Datadog, New Relic, and Sentry Performance provide distributed tracing and automatic slow transaction detection.
Distributed Tracing
OpenTelemetry + Jaeger/Zipkin traces cross-service request chains to identify which service is the bottleneck.
Database Slow Query Logs
MySQL slow_query_log and PostgreSQL pg_stat_statements log queries that exceed a time threshold.
Flame Graph
Visually shows CPU time distribution across the call stack, quickly identifying hot functions.
Common Bottlenecks
N+1 queries, missing indexes, heavy synchronous I/O, memory leaks (GC pressure), lock contention.
✦ AI Mock Interview
Type your answer and get instant AI feedback
Sign in to use AI scoring
