Backend Engineer · interview questions

Backend Engineer interview questions: how you'd do it

From the role's core and recommended topics, most asked first. Filter by the kind of answer the question wants.

API Design Core 7

  1. Most asked What makes an API RESTful, and what are good REST design practices?
  2. Most asked How should you version an API?
  3. How do you design reliable webhooks?
  4. How do you design APIs for long-running operations?
  5. What makes a great developer experience for a public API?
  6. How do you design event-driven APIs (events between services)?
  7. How do you deprecate an API endpoint responsibly?

Authentication Core 7

  1. Most asked How do you secure session cookies?
  2. Most asked How do you protect login endpoints from brute force and credential stuffing?
  3. How do you design a secure password reset flow?
  4. How do you implement logout correctly across sessions and tokens?
  5. How would you implement admin impersonation safely?
  6. How do you authenticate WebSocket connections?
  7. How do you safely link social logins to existing accounts?

Authorization Core 9

  1. Most asked How do you enforce tenant isolation in a multi-tenant SaaS?
  2. How do you design privileged admin access safely?
  3. How do you cache authorization decisions safely?
  4. How do you audit who has access to what?
  5. How do you model resource ownership and sharing?
  6. How do you test authorization logic?
  7. How do you implement delegated access (acting on behalf of someone)?
  8. How do you enforce authorization in background jobs and queues?
  9. How do you return only the data a user is allowed to see in list endpoints?

Caching Core 8

  1. Most asked How do you design good cache keys?
  2. How do you invalidate caches when many services and scripts write to the same tables?
  3. How do you choose a TTL?
  4. What should you consider when serializing objects into a cache?
  5. How do you invalidate content on a CDN?
  6. How would you cache high-frequency counters (views, likes) efficiently?
  7. How do you implement a distributed lock with Redis, and what are the caveats?
  8. What metrics tell you a cache is healthy?

Databases & Transactions Core 6

  1. Most asked How do you choose between SQL and NoSQL databases?
  2. Most asked How do you run schema migrations without downtime?
  3. What causes deadlocks and how do you handle them?
  4. How do you read a query plan and optimize a slow query?
  5. How should you back up and restore databases?
  6. How should you test database code?

Testing Core 19

  1. Most asked What makes a good unit test?
  2. Most asked How do you write reliable integration tests that use a database?
  3. Most asked What causes flaky tests and how do you fix them?
  4. How do you test code that depends on the current time or randomness?
  5. How do you test code that calls external HTTP services?
  6. How should you test frontend components?
  7. How do you test an API, and what would you automate?
  8. How do you approach performance and load testing?
  9. How do you manage test data for automated tests?
  10. What should block a release, and how do you report quality to stakeholders?
  11. How do you test a feature behind a feature flag?
  12. How do you integrate automated tests into a CI/CD pipeline?
  13. How should you manage test data?
  14. How do you test asynchronous code?
  15. How do you prevent regressions when fixing bugs?
  16. How do you include security testing in development?
  17. How do you add tests to legacy code that wasn't designed for testing?
  18. How do you test code behind feature flags?
  19. How do you test accessibility?

Messaging & Queues Core 9

  1. Most asked How do you make message consumers idempotent?
  2. How do you guarantee message ordering?
  3. How do you design background job processing for a web application?
  4. How do you evolve message schemas safely?
  5. What should you monitor in a messaging system?
  6. How do you test asynchronous, message-driven code?
  7. How do you implement priority processing?
  8. How do you increase throughput of message processing?
  9. How do you secure message brokers?

Database Concurrency & Scaling Recommended 12

  1. Most asked How do you choose a shard key for a multi-tenant SaaS?
  2. Most asked How do you rename a column with zero downtime?
  3. Most asked How do you prevent overselling in a flash sale with 50,000 buyers in the first minute?
  4. How would you prevent double-booking a meeting room?
  5. How do you build a reliable job queue on Postgres?
  6. How do you retry a transaction safely after a serialization failure or deadlock?
  7. How do you choose the column order of a composite index?
  8. How would you make webhook processing exactly-once from the database's point of view?
  9. How do you delete 90 days of old events every night without hurting production?
  10. How do you generate unique IDs across database shards?
  11. How do you safely backfill 50 million rows?
  12. How do you design user-facing features on top of eventually consistent data like search indexes?

Performance & Scalability Recommended 6

  1. Most asked How do you approach a performance problem methodically?
  2. How do you load test a system effectively?
  3. How would you scale a read-heavy system?
  4. How would you scale a write-heavy system?
  5. How do you reduce payload sizes in web applications?
  6. How do you do capacity planning?

Logging & Observability Recommended 8

  1. What makes a good alert?
  2. How do you design centralized log aggregation?
  3. How do you collect logs and metrics in Kubernetes?
  4. What makes an error log line useful during an incident?
  5. How do you control the cost of logs and telemetry?
  6. How do you add observability to a frontend application?
  7. How do you find slow database queries in production?
  8. How do you observe the impact of a deployment or feature flag?

Web Security & WAF Recommended 4

  1. How do you protect a web application from DDoS and abusive traffic?
  2. How do you manage vulnerable and outdated dependencies?
  3. How do you protect sign-up, login and checkout flows from bots?
  4. How do you build security into the development lifecycle?

Web Framework Internals Recommended 1

  1. How do you trace a single request across a load balancer, web server, application and downstream services?

Design Patterns Recommended 6

  1. Most asked How do you implement a Singleton, and why is it often considered an anti-pattern?
  2. Most asked How would you implement undo/redo with the Command pattern?
  3. How do you apply the Open/Closed Principle?
  4. How do you safely refactor existing code toward a design pattern?
  5. How would you refactor a god object?
  6. How would you explain to a junior developer how to choose the right design pattern?

Docker Recommended 11

  1. Most asked How do you secure Docker containers and images?
  2. Most asked How do you make Docker images smaller?
  3. Most asked How do you limit a container's CPU and memory, and what happens when it exceeds them?
  4. Most asked How should you tag Docker images, and why is 'latest' a problem?
  5. Most asked How do you debug a container that exits immediately or behaves differently in production?
  6. Most asked How do you run Docker builds in CI pipelines efficiently and safely?
  7. What should you consider when choosing a base image?
  8. How do you run a database in Docker for local development, and should you do it in production?
  9. How do you speed up a slow Docker build?
  10. How do you clean up disk space used by Docker?
  11. How do you run multiple processes in one container, and should you?

FAANG / Big Tech Recommended 20

  1. Most asked How do you find the longest substring without repeating characters?
  2. Most asked How would you approach a coding interview if stuck for 5 minutes?
  3. How do you detect a cycle in a linked list?
  4. How do you serialize/deserialize a binary tree?
  5. How do you find median from a data stream?
  6. How do you topologically sort a graph?
  7. How do you earn trust with a cross-functional partner?
  8. How do you design for multi-region?
  9. How do you observe a production service?
  10. How do you prioritize a backlog under pressure?
  11. How would you A/B test a ranking change?
  12. How do you secure secrets in cloud apps?
  13. How would you estimate storage for a messaging app?
  14. What metrics define a healthy API?
  15. How do you design on-device ML inference with cloud fallback?
  16. How would you migrate a monolith to services without downtime?
  17. How do you secure secrets in a large engineering org?
  18. How would you interview-design a battery-efficient background sync?
  19. How do you prepare for a bar-raiser interview?
  20. How do you approach object-oriented design for an elevator system?

Was this page helpful?

Report a mistake