Mid-LevelPerformance & Load Testing
Explain the concept of "performance budgets" for frontend applications.
- performance budgets
- Core Web Vitals
- frontend
Answer it first, then compare. Nothing here is saved or scored.
Model answer
Performance budgets set limits on frontend metrics: total page weight (<500KB), JavaScript bundle size (<200KB), time to interactive (<3s), largest contentful paint (<2.5s), and cumulative layout shift (<0.1). Enforce in CI using Lighthouse CI, bundlesize, or webpack-bundle-analyzer. When a PR exceeds the budget, it fails. This prevents gradual performance decay where individual changes are small but accumulate into a slow app. Google's Core Web Vitals provide industry-standard thresholds.
What interviewers listen for
- Workload modellingYou design the load shape from product traffic, not from tool defaults.
- Percentile literacyYou read p50/p95/p99 separately and explain why each matters.
- Bottleneck triageYou correlate metrics across application, database, and infrastructure layers.
- Capacity instinctsYou can translate a soak test into a sizing or scaling recommendation.