Performance & Load Testing interview questions.
Questions on JMeter, k6, Gatling, load testing strategy, performance metrics, bottleneck analysis, and capacity planning.
A test passes locally but fails in CI about one run in five. Walk me through what you check first, and why.
This single answer is scored on four dimensions: Technical accuracy · Coverage · Clarity · Best practices.
Free to start · 7-day trial on paid plans
How to approach performance questions.
Performance testing interviews are unusual because most candidates have read about percentiles and very few have actually been on the hook for a launch where p99 mattered. Interviewers can tell within two questions which group you are in. The fastest way to land in the second group is to talk about the test you actually ran, the metric you actually watched, and the threshold you actually breached.
Start with workload modelling, not tool choice. A senior interviewer will ask "how would you load test this?" and the wrong answer is "I would use k6 with 1000 virtual users." The right answer walks through traffic shape: peak versus average, burst versus sustained, read-heavy versus write-heavy, geographic distribution. Pick the workload that maps to the product, then justify your tool. JMeter for protocol-level scenarios on Java stacks, k6 for scriptable JavaScript-driven runs that fit modern CI, Gatling when you need precise timing in Scala-friendly environments.
Talk in percentiles, not averages. "Average response time was 250ms" is the answer that ends the conversation. "p50 was 120ms, p95 climbed past our 500ms SLO at 800 RPS, and p99 fell off a cliff at 1000 RPS where the connection pool saturated" is the answer that earns a follow-up. Have at least one war story where you correlated a percentile shift to a specific bottleneck (DB pool, GC pause, downstream timeout, CPU steal on a noisy neighbor).
Capacity planning is the senior question. Be ready to describe how you turn a load test into a sizing decision: how you extrapolate from a soak test to a six-month growth forecast, how you incorporate failure budgets, and where you draw the line between adding capacity and fixing the architecture. If you have ever pushed back on adding hardware because the slow path was an N+1 query, lead with that story.
What hiring managers are listening 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.
Do not assume the interview is about tools. The question "how do you write a JMeter test?" is a setup. The follow-up is "and how do you know that test reflects production?" If you have not thought about think time, ramp profiles, and warm caches versus cold ones, the second question will catch you flat.
Need the vocabulary first? Browse all 35 Specialized Testing terms in the QA glossary.
Showing 35 questions · 10 free answers remaining
Load testing: measure performance under expected user volume (e.g., 1000 concurrent users). Stress testing: push beyond expected limits to find the breaking point (e.g., ramp to 10,000 users until errors appear). Spike testing: sudden burst of traffic (e.g., 0 to 5000 users in 10 seconds) to test auto-scaling and recovery. Each answers a different question: "Can we handle normal traffic?" vs. "When do we break?" vs. "Can we handle sudden surges?"
Practice this question on its own pageTry a scored practice question, freeResponse time (p50, p95, p99, not just average), throughput (requests per second), error rate (% of failed requests), concurrent users, and resource utilization (CPU, memory, disk I/O, network). p95 and p99 are more important than average - they show worst-case user experience. Also monitor: database query times, connection pool usage, queue depth, and garbage collection pauses.
Practice this question on its own pageTry a scored practice question, freeJMeter: GUI-based, Java, huge plugin ecosystem, great for complex protocols (SOAP, JMS, JDBC), but resource-heavy per thread. k6: JavaScript-based, lightweight Go runtime, modern API, excellent for CI/CD integration and developer-written tests, but fewer protocols than JMeter. Gatling: code-first approach with Java and JavaScript/TypeScript SDKs, excellent reports, efficient non-blocking architecture. Choose k6 for developer teams and CI integration, JMeter for complex enterprise protocols, Gatling for code-first performance teams.
Practice this question on its own pageTry a scored practice question, freeSystematic approach: (1) Correlate response time degradation with resource metrics, does CPU spike when response times increase? (2) Check database - slow queries (enable slow query log), connection pool exhaustion, lock contention. (3) Check application - thread pool saturation, memory leaks (heap growth over time), GC pauses. (4) Check infrastructure - network bandwidth, disk I/O, load balancer distribution. (5) Use APM tools (Datadog, New Relic) to trace individual slow requests through the stack.
Practice this question on its own pageTry a scored practice question, freeBasic structure: define `options` (stages for ramp-up/down, thresholds for pass/fail), export a `default function` with HTTP requests and checks. Example: `export const options = { stages: [{ duration: "2m", target: 100 }, { duration: "5m", target: 100 }, { duration: "2m", target: 0 }], thresholds: { http_req_duration: ["p(95)<500"] } }`. Use `check()` for assertions, `group()` for logical grouping, and `sleep()` for think time between requests.
Practice this question on its own pageTry a scored practice question, freeThink time simulates the pause between user actions, a real user reads a page for 5-30 seconds before clicking the next link. Without think time, your load test generates unrealistically high request rates (each virtual user fires requests back-to-back), making results inaccurate. Too much think time underestimates load. Use realistic think times based on analytics data. In k6: `sleep(Math.random() * 5 + 2)` for 2-7 second random pauses.
Practice this question on its own pageTry a scored practice question, freeBeyond HTTP load testing, directly test the database layer: (1) Query performance, EXPLAIN plans for critical queries, index coverage. (2) Connection pooling - test pool exhaustion under load. (3) Read/write ratio - mirror production patterns. (4) Data volume - test with production-scale data (not a tiny dev DB). (5) Lock contention - concurrent updates to the same rows. (6) Replication lag - test read-replica consistency under write-heavy load. Monitor: query time percentiles, connection wait time, deadlock frequency.
Practice this question on its own pageTry a scored practice question, freeBase thresholds on: (1) Business requirements, "checkout must complete in under 3 seconds." (2) Current baseline - measure existing performance, set thresholds to detect regressions (e.g., p95 must not exceed 1.2x baseline). (3) Industry standards - Google recommends <200ms for API calls, <3s for page loads. (4) User expectations - correlated with bounce rates. Express as: p95 response time < X ms, error rate < Y%, throughput > Z rps. Fail the build in CI if thresholds are breached.
Practice this question on its own pageTry a scored practice question, freeVertical: more CPU/RAM on a single machine, simpler but has a ceiling. Horizontal: more machines behind a load balancer - scales further but adds complexity (session management, data consistency). Test vertical: increase load until resources max out, note the ceiling. Test horizontal: verify load balancer distributes evenly, test with N and N+1 instances, verify auto-scaling triggers at the right threshold, and test instance startup time under sudden load.
Practice this question on its own pageTry a scored practice question, freeProcess: (1) Establish current capacity, what load does the system handle within SLA thresholds? (2) Model growth - if traffic is growing 20% quarterly, when will current capacity be exceeded? (3) Test scaling scenarios - does adding 2x instances give 2x capacity (linear scaling) or less (bottleneck elsewhere)? (4) Identify the constraint - DB, network, CPU, or specific service. (5) Build a capacity model: users × avg requests per session × peak multiplier = required throughput. Re-validate quarterly.
Practice this question on its own pageTry a scored practice question, freeTest both cached and uncached scenarios: (1) Cache hit, verify CDN serves content quickly from edge. (2) Cache miss - test origin server performance when CDN cache is cold (purge cache before testing). (3) Cache invalidation - verify stale content is purged correctly. (4) Geographic distribution - run load tests from multiple regions to test CDN edge performance. (5) Dynamic vs. static - ensure CDN only caches appropriate content. (6) Cache thundering herd - many simultaneous cache misses for the same resource.
Practice this question on its own pageTry a scored practice question, freeSoak (endurance) testing runs a moderate load for an extended period (4-24+ hours) to find issues that only appear over time: memory leaks, connection pool exhaustion, log file disk consumption, database connection leaks, and performance degradation from fragmentation. Use it before major releases or when you suspect resource leaks. Monitor resource trends, a slow upward crawl in memory usage indicates a leak even if the app performs fine in short tests.
Practice this question on its own pageTry a scored practice question, freeWebSockets maintain persistent connections, so the key metrics differ: connection count (how many simultaneous connections before failure), message latency (time from send to receive), message throughput (messages per second), reconnection behavior under network instability, and memory per connection on the server. Tools: k6 has WebSocket support, Artillery supports Socket.io, or custom scripts with ws library. Test both fan-out (one message to many clients) and fan-in (many clients sending simultaneously).
Practice this question on its own pageTry a scored practice question, freeUse lightweight performance tests (not full load tests) in CI: (1) Run a small-scale load test (50-100 VUs for 2 minutes) against a dedicated perf environment. (2) Assert thresholds in the script, k6 `thresholds` fail the test if p95 > X ms. (3) Fail the pipeline if thresholds are breached. (4) Store results (InfluxDB + Grafana) for trend analysis over time. (5) Run full-scale load tests on a schedule (nightly or pre-release) rather than on every commit. Keep CI fast, catch regressions automatically.
Practice this question on its own pageTry a scored practice question, freeA test against an empty database is meaningless. Approaches: (1) Snapshot production data (anonymized/masked) into the test environment. (2) Generate synthetic data at production scale using data factories. (3) Account for data growth, test with 2x current data volume. (4) Include data variety - different user types, edge cases in data. Key areas affected by data volume: query performance (index effectiveness at scale), pagination, search, and reporting. Always mention data volume when reporting results.
Practice this question on its own pageTry a scored practice question, freePerformance 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.
Practice this question on its own pageTry a scored practice question, freeMulti-layer strategy: (1) Component testing, individual service benchmarks. (2) Integration testing - end-to-end transaction flows (browse → cart → checkout). (3) Full-scale load testing - simulate peak events (Black Friday) with geo-distributed load generation. (4) Chaos engineering - test resilience under failure (service down, network partition, slow database). (5) Production monitoring - synthetic monitoring, real user monitoring (RUM), alerting on SLA breach. Scale considerations: CDN caching, database read replicas, queue-based order processing. Test from multiple geographic regions to verify CDN and latency.
Practice this question on its own pageTry a scored practice question, freeLoad testing: simulate expected user traffic to verify the system meets performance SLAs under normal conditions. Stress testing: push beyond expected load to find the breaking point, what happens at 2x, 5x, 10x normal traffic. Soak (endurance) testing: run at normal load for an extended period (hours/days) to find memory leaks, connection pool exhaustion, and gradual degradation. Each answers a different question: "Can it handle normal load?" vs "When does it break?" vs "Does it degrade over time?"
Practice this question on its own pageTry a scored practice question, freeSteps: (1) Run baseline tests against the current system under typical load. (2) Measure key metrics: response time (p50, p95, p99), throughput (requests/sec), error rate, resource utilization. (3) Correlate with real user monitoring (RUM) data if available. (4) Define SLAs based on business requirements and user expectations (e.g., page load under 2s, API response under 200ms p95). (5) Store baselines in version control and compare on every release. (6) Set alerting thresholds at 80% of SLA to catch degradation before users notice.
Practice this question on its own pageTry a scored practice question, freeTechniques: (1) Analyze production traffic patterns (peak hours, geographic distribution, device mix). (2) Model user journeys, not just individual endpoints (browse, search, add to cart, checkout). (3) Add think time between actions (realistic pauses, not machine-gun requests). (4) Use varied test data, different users, products, search terms. (5) Ramp up gradually, not instant spike. (6) Include authentication and session management. (7) Model the ratio of read vs write operations from production. Without realistic behavior, your test results will not predict production performance.
Practice this question on its own pageTry a scored practice question, freeKey metrics: (1) Response time percentiles: p50 (median), p95, p99. Averages hide outliers. (2) Throughput: requests per second the system can handle. (3) Error rate: percentage of failed requests under load. (4) Resource utilization: CPU, memory, disk I/O, network. (5) Connection counts: active connections, connection pool usage. (6) Apdex score: user satisfaction metric combining fast, tolerable, and frustrated requests. (7) Saturation point: the load level where response times start climbing exponentially.
Practice this question on its own pageTry a scored practice question, freeFocus areas: (1) Slow query identification, enable query logging and analyze during load. (2) Connection pool sizing, test with pool exhaustion scenarios. (3) Index effectiveness, monitor query plans under load. (4) Lock contention, concurrent writes to the same rows/tables. (5) Read replica lag under write-heavy load. (6) Cache hit rates, test with cold cache vs warm cache. (7) Data volume, test with production-scale data, not empty databases. Tools: database-specific profilers, pg_stat_statements for Postgres, EXPLAIN ANALYZE.
Practice this question on its own pageTry a scored practice question, freek6 uses JavaScript for test scripts. Key concepts: (1) Virtual Users (VUs) simulate concurrent users. (2) Stages define ramp-up/down patterns. (3) Checks are assertions (status code, response time). (4) Thresholds define pass/fail criteria (p95 < 500ms). (5) Groups organize requests into logical transactions. (6) Tags enable filtering results by endpoint/feature. Typical script: export options with stages, export default function with http.get/post calls and checks. Run with k6 run script.js or k6 cloud run script.js for distributed load.
Practice this question on its own pageTry a scored practice question, freeTests: (1) Cache hit ratio: request the same resource multiple times, verify subsequent requests are faster and served from cache (check X-Cache headers). (2) Cache invalidation: update content, verify the cache serves fresh content after TTL or purge. (3) Geographic distribution: test from multiple regions to verify edge server performance. (4) Cache stampede: expire a popular resource and send concurrent requests, verify the origin is not overwhelmed. (5) Bypass testing: verify cache-busting parameters work. (6) Compare response times with and without CDN.
Practice this question on its own pageTry a scored practice question, freeUnique challenges: cold starts, concurrency limits, timeout constraints. Tests: (1) Cold start latency: invoke after idle period, measure initialization time. (2) Warm invocation performance: rapid successive calls. (3) Concurrency scaling: send N concurrent requests, verify auto-scaling works and response times are acceptable. (4) Memory and timeout limits: test with varying payload sizes. (5) Cost modeling: estimate cost per request under expected load. (6) Compare cold vs warm performance across memory allocations. Tools: k6, Artillery, AWS Lambda Power Tuning.
Practice this question on its own pageTry a scored practice question, freeDetection: (1) Soak test: run steady load for 4-24 hours, monitor memory usage trends. (2) A consistent upward trend in memory without corresponding load increase indicates a leak. (3) Monitor garbage collection frequency and duration. Resolution: (4) Use profiling tools (Node.js heap snapshots, Chrome DevTools, Java VisualVM). (5) Compare heap snapshots at intervals to find growing objects. (6) Common causes: unclosed connections, event listener accumulation, growing caches without eviction, global variables. (7) After fix, re-run soak test to verify memory is stable.
Practice this question on its own pageTry a scored practice question, freeSteps: (1) Gather business projections: expected user growth, seasonal peaks, marketing campaigns. (2) Baseline current capacity: max throughput, resource utilization at peak. (3) Model the scaling curve: does performance degrade linearly or exponentially with load? (4) Identify bottlenecks: which component saturates first (CPU, database, network)? (5) Plan scaling strategy: horizontal vs vertical, auto-scaling thresholds. (6) Cost model: infrastructure cost per user at different scales. (7) Validate with load tests at projected capacity. (8) Build headroom: plan for 1.5-2x projected peak.
Practice this question on its own pageTry a scored practice question, freeSimulate real-world network conditions: (1) Latency injection: add 50-500ms delay to simulate mobile/satellite networks. (2) Bandwidth throttling: limit to 3G/4G speeds. (3) Packet loss: simulate unreliable connections (1-5% loss). (4) Test timeout handling: verify the application gracefully handles slow responses. (5) Test with different geographic regions (via CDN or cloud region testing). Tools: tc (Linux traffic control), Chrome DevTools throttling, k6 with custom scenarios, Toxiproxy for service-level network simulation.
Practice this question on its own pageTry a scored practice question, freeGatling is a code-first performance testing tool with Java and JavaScript/TypeScript SDKs and a DSL for writing simulations. Strengths: detailed HTML reports out of the box, excellent for CI integration, handles very high load efficiently (non-blocking I/O), recorder for capturing scenarios. Choose over k6 when: team writes Java or JavaScript/TypeScript, need beautiful built-in reports, testing WebSocket-heavy applications. Choose over JMeter when: need code-based tests (version control friendly), better performance at scale (JMeter uses threads, Gatling uses non-blocking I/O). All three are viable, pick based on team skills and reporting needs.
Practice this question on its own pageTry a scored practice question, freeApproach: (1) Lightweight smoke performance tests on every PR (5-10 seconds, verify no major regression). (2) Full performance suite on merge to main or nightly (realistic load, 5-30 minutes). (3) Threshold-based gates: fail the build if p95 > SLA or error rate > 1%. (4) Trend tracking: store results over time, alert on gradual degradation. (5) Isolated test environment that mirrors production. (6) Parameterized tests: different profiles for smoke vs full load. Tools: k6 with GitHub Actions, Gatling with Jenkins, custom scripts with threshold assertions.
Practice this question on its own pageTry a scored practice question, freeBefore migration: (1) Benchmark current query performance and throughput. (2) Test migration on a production-scale copy of the database, not a small test database. (3) Measure migration execution time and lock duration. During migration: (4) Test that the application remains available (zero-downtime migration). (5) Monitor query performance during the migration. After migration: (6) Re-run performance benchmarks and compare. (7) Test with production-like data volume. Key: always test migrations with realistic data sizes, a migration that takes 1 second on test data might take 30 minutes on production.
Practice this question on its own pageTry a scored practice question, freeChaos engineering deliberately introduces failures to test system resilience: kill a service, introduce network latency, fill a disk, exhaust memory. Relation to performance: (1) Performance under failure, how does the system perform when a dependency is slow or down? (2) Failover performance, how quickly does the system recover? (3) Graceful degradation, does the system serve partial results or error completely? Tools: Chaos Monkey, Litmus, Gremlin, Toxiproxy. Start small: inject one failure at a time, in non-production, with monitoring in place. Graduate to production chaos as confidence grows.
Practice this question on its own pageTry a scored practice question, freeChallenges: persistent connections, bidirectional communication, connection limits. Tests: (1) Maximum concurrent connections: ramp up connections and find the ceiling. (2) Message throughput: send N messages/second across all connections. (3) Broadcast latency: measure time from server event to all clients receiving it. (4) Reconnection storm: disconnect all clients simultaneously and test reconnection handling. (5) Memory per connection: monitor server memory as connections grow. Tools: k6 with WebSocket support, Artillery, custom Node.js scripts with ws library.
Practice this question on its own pageTry a scored practice question, freeTranslate technical metrics to business impact: (1) Instead of "p95 response time is 2.3s," say "5% of customers will wait over 2 seconds, research shows this causes 15% abandonment." (2) Use before/after comparisons with visual charts. (3) Show the cost of inaction: revenue at risk, customer churn, support ticket volume. (4) Traffic light summaries: green/yellow/red for key SLAs. (5) Compare to competitors if benchmarks are available. (6) Focus on user experience metrics (Core Web Vitals, Apdex) rather than infrastructure metrics.
Practice this question on its own pageTry a scored practice question, freeComponents: (1) Multi-region load generation: run tests from each region where users are. (2) CDN and edge caching validation: verify content is served from local edge nodes. (3) Database replication lag: measure read consistency across regions. (4) DNS and routing performance: test failover between regions. (5) User journey testing from each region: account for network latency in SLAs. (6) Time-zone-based load patterns: simulate realistic global traffic distribution. (7) Compliance: data residency requirements may affect architecture and performance. Infrastructure: distributed k6 agents, cloud-based load generation (Grafana Cloud k6).
Practice this question on its own pageTry a scored practice question, freeStop reading answers. Start practicing them.
AssertHired's AI interviewer asks follow-up questions, scores your responses across 4 QA-specific dimensions, and gives you actionable feedback.
Answer a Free QuestionFree to start · 7-day trial on paid plans
More Question Categories
Explore questions across all QA interview topics.
Practice by Tool & Technology
Dive deeper with tool-specific interview questions.
Go deeper on performance testing
Go beyond practice interviews - get the guides, drills, and frameworks that top QA engineers use.
Free QA career tools, no account needed
Instant and private, everything runs in your browser. Try them before you sign up.
QA Resume Checker
Instant 0-100 score on automation keywords, impact, and ATS formatting.
QA Cover Letter Generator
A tailored 3-paragraph QA cover letter from your resume and a job post.
QA Application Tracker
Drag-and-drop kanban to track every QA application from Applied to Offer.
QA Take-Home Test Generator
A realistic take-home assignment with a scenario, tasks, and a rubric.
QA LinkedIn Headline Generator
A recruiter-searchable headline, About section, and skills list.
QA STAR Story Builder
Structure a QA behavioral answer with the STAR method and instant checks.
QA Bug Report Generator
Build a clean, reproducible bug report for Markdown, Jira, or plain text.
Boundary Value Analysis Generator
Generate boundary value and equivalence partitioning test cases from a range.
QA Metrics Calculator
Calculate DRE, defect leakage, defect density, and pass rate with interpretation.
QA Test Plan Generator
Build a structured test plan (scope, approach, criteria, risks) in Markdown.
QA Salary Calculator
Estimate QA, SDET, and automation tester pay by level, market, and skills.
QA Offer Evaluator
See total comp, a counter range, and a ready-to-send negotiation message.
Ready to Ace Your QA Interview?
Stop reading answers, start practicing them live with AI that knows QA.
Join 700+ QA engineers already practicing with AssertHired.
A test passes locally but fails in CI about one run in five. Walk me through what you check first, and why.
This single answer is scored on four dimensions: Technical accuracy · Coverage · Clarity · Best practices.
Rather skip ahead? Create a free account