InterviewStack.io LogoInterviewStack.io

Performance Engineering and Cost Optimization Questions

Engineering practices and trade offs for meeting performance objectives while controlling operational cost. Topics include setting latency and throughput targets and latency budgets; benchmarking profiling and tuning across application database and infrastructure layers; memory compute serialization and batching optimizations; asynchronous processing and workload shaping; capacity estimation and right sizing for compute and storage to reduce cost; understanding cost drivers in cloud environments including network egress and storage tiering; trade offs between real time and batch processing; and monitoring to detect and prevent performance regressions. Candidates should describe measurement driven approaches to optimization and be able to justify trade offs between cost complexity and user experience.

MediumTechnical
44 practiced
You implemented a caching layer expected to improve p99 latency. Describe an experiment and analysis plan to measure whether p99 improved in production. Include how you would collect and aggregate samples, warm-up period, time windows, calculating confidence intervals for heavy-tailed data, and how to detect false positives from noise.
EasyTechnical
49 practiced
In Node.js (JavaScript), implement a batching utility that accepts individual requests and groups them into a single batched call to an external API. Requirements: batch if either (a) batch size reaches N, or (b) time window T milliseconds elapses. Provide an API: async function submit(payload) -> response. Handle concurrent submits, ensure each submit receives the correct response, and manage edge cases like partial failures.
EasyTechnical
86 practiced
Describe common asynchronous processing patterns for backend systems (background workers, message queues, event-driven handlers, delayed tasks). For a user-facing POST endpoint that currently performs heavy work synchronously, explain a migration path to offload work asynchronously while preserving user experience (task status, optimistic responses, webhooks).
HardSystem Design
85 practiced
Create an architecture for a multi-tenant SaaS that enforces tenant cost isolation and prevents noisy neighbors while minimizing per-tenant overhead. Compare shared-cluster with strict quotas, mixed pooled/dedicated resources, cgroup/QoS approaches, token-bucket per-tenant throttles, and chargeback/billing metrics. Explain how to measure per-tenant cost accurately to support billing and SLA enforcement.
MediumTechnical
60 practiced
Design a benchmarking plan to evaluate a backend performance change that touches application code, database queries, and network I/O. Explain how you would: (1) create representative workloads (think mix of endpoints and payload sizes), (2) isolate each layer (app, DB, network) for measurement, (3) choose warm-up and measurement durations, and (4) ensure results are repeatable and statistically significant despite noisy cloud environments.

Unlock Full Question Bank

Get access to hundreds of Performance Engineering and Cost Optimization interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.