Performance Engineering
Design and execute performance engineering practices: load testing strategies, capacity planning, bottleneck identification, caching architecture, and SLA definition.
Guiding Principle
"Performance is a feature — measure before optimizing, profile before guessing, and define SLAs before building."
Procedure
Step 1 — Performance Baseline & SLA Definition
- Define performance SLAs: p50, p95, p99 latency targets per endpoint
- Identify critical user journeys and their performance budgets
- Establish baseline measurements for current system performance
- Define throughput targets: requests/second, concurrent users, transactions/minute
- Map SLAs to infrastructure capacity and cost constraints
Step 2 — Load Testing Design
- Design load test scenarios: baseline, stress, spike, soak, breakpoint
- Create realistic traffic patterns based on production data analysis
- Design test data generation to avoid hot-spotting and cache warming bias
- Configure test infrastructure to isolate from production traffic
- Define success criteria and automated pass/fail thresholds per scenario
Step 3 — Bottleneck Analysis
- Profile application performance: CPU, memory, I/O, network, GC patterns
- Analyze database performance: slow queries, lock contention, connection pool saturation
- Identify network bottlenecks: DNS resolution, TLS handshakes, connection limits
- Map resource utilization across the request path (flame graphs, traces)
- Prioritize bottlenecks by impact on user-facing latency
Step 4 — Optimization & Caching
- Design caching strategy: what, where, how long, invalidation approach
- Implement caching layers: CDN, application cache, database query cache
- Design connection pooling optimization for databases and external APIs
- Implement async processing for non-critical path operations
- Define performance regression detection in CI/CD pipeline
Quality Criteria
- SLAs defined for all critical endpoints with automated monitoring
- Load tests validate 2x projected peak traffic with SLAs maintained
- Bottleneck analysis backed by profiling data, not assumptions
- Caching strategy includes invalidation logic and cache-miss fallback
Anti-Patterns
- Optimizing without profiling (guessing where the bottleneck is)
- Load testing against a single endpoint instead of realistic user journeys
- Caching everything with no invalidation strategy (stale data)
- SLAs defined once and never monitored or enforced