API Design interview question
An API endpoint that was fast is now taking seconds under load. Walk through your investigation.
Scenario Asked in Backend Engineer · Full Stack Engineer · Native AI Engineer · Forward Deployed Engineer (FDE) · QA Engineer / SDET · Tech Lead interviews
Summary
Find where the time goes with traces and metrics, then match it to a resource: database queries (slow query log, missing index, N+1 queries), connection or thread pool waits, a slow downstream call, lock contention, or CPU spent in serialisation. Compare with a known good period and with recent changes, fix the bottleneck, and load test the fix.
Keep reading with a membership
The full answer with examples, key points and comparisons is part of the membership, along with every other interview answer, progress tracking and Daily Review. Most-asked answers stay free to read.
More API Design questions
- What makes an API RESTful, and what are good REST design practices?
- Compare offset pagination and cursor (keyset) pagination.
- Write an Express or FastAPI endpoint that creates an order idempotently.
- Write a SQL query that returns each customer's three most recent orders.
- Which HTTP methods are safe and idempotent, and why does it matter?
- Which HTTP status codes should an API use, and when?
- How do idempotency keys work for POST requests?
- How should you version an API?