Backend Engineer · interview questions

Backend Engineer interview questions: how it works

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

API Design Core 9

  1. Most asked How do idempotency keys work for POST requests?
  2. How should APIs format error responses?
  3. How should APIs support filtering, sorting and field selection?
  4. How should an API communicate rate limits to clients?
  5. How do APIs prevent lost updates from concurrent edits?
  6. How should APIs represent dates, times and money?
  7. How should APIs handle large file uploads and downloads?
  8. How can APIs leverage HTTP caching?
  9. How do APIs handle localization?

Authentication Core 7

  1. Most asked Explain the OAuth 2.0 Authorization Code flow with PKCE.
  2. Most asked How do refresh tokens work, and how do you secure them?
  3. Most asked How should passwords be stored?
  4. How do services authenticate to each other?
  5. How should mobile apps handle authentication?
  6. How does JWKS-based key rotation work for JWTs?
  7. How does authentication change in multi-tenant B2B applications?

Authorization Core 8

  1. Most asked Where should authorization checks live in an application?
  2. How do you handle authorization in GraphQL APIs?
  3. How do OAuth scopes relate to user permissions in an API?
  4. Is it enough to enforce authorization at an API gateway?
  5. How should the frontend handle permissions?
  6. How does Postgres Row-Level Security work?
  7. How does cloud IAM (AWS/GCP/Azure) authorization work at a high level?
  8. How do plan limits (quotas) relate to authorization?

Caching Core 12

  1. Most asked Explain the main caching patterns: cache-aside, read-through, write-through and write-behind.
  2. Most asked How does HTTP caching work (Cache-Control, ETag, CDNs)?
  3. Most asked In cache-aside, why can a value be stale even though you delete the key on every write?
  4. Most asked How can a CDN leak one user's data to another, and how do you prevent it?
  5. Most asked In a system design interview, how do you decide what and where to cache?
  6. Most asked How does stale-while-revalidate work, and when is it inappropriate?
  7. How do you handle hot keys in a distributed cache?
  8. How does Redis scale and stay available?
  9. What happens if the cache goes down, and how do you design for it?
  10. How do frontend applications cache server data?
  11. How does a Bloom filter help in caching systems?
  12. How do you invalidate thousands of related cache keys (e.g. all pages of a category) efficiently?

Databases & Transactions Core 5

  1. Most asked Explain transaction isolation levels and the anomalies they prevent.
  2. Most asked How do database indexes work and when do they help or hurt?
  3. How does database replication work, and what is replication lag?
  4. How do you scale a relational database?
  5. How does the CAP theorem apply to databases?

SQL & Databases Core 35

  1. Most asked SQL interview: explain INNER JOIN.
  2. Most asked SQL interview: explain LEFT JOIN.
  3. Most asked SQL interview: explain GROUP BY.
  4. Most asked SQL interview: explain HAVING.
  5. Most asked SQL interview: explain window functions.
  6. Most asked SQL interview: explain ACID.
  7. Most asked SQL interview: explain isolation levels.
  8. Most asked Data modeling: normalization 1NF/2NF/3NF?
  9. Most asked Indexing/performance: B-tree index?
  10. Most asked Indexing/performance: EXPLAIN / EXPLAIN ANALYZE?
  11. SQL interview: explain SELECT filtering.
  12. SQL interview: explain NULL semantics.
  13. SQL interview: explain transactions.
  14. Data modeling: primary key?
  15. Data modeling: foreign key?
  16. Data modeling: many-to-many?
  17. Indexing/performance: composite index?
  18. Indexing/performance: index write overhead?
  19. SQL interview: explain RIGHT / FULL JOIN.
  20. SQL interview: explain ORDER BY / LIMIT.
  21. SQL interview: explain subqueries.
  22. SQL interview: explain CTEs (WITH).
  23. SQL interview: explain CASE expressions.
  24. SQL interview: explain dirty/nonrepeatable/phantom reads.
  25. Data modeling: denormalization?
  26. Data modeling: constraints?
  27. Indexing/performance: covering index?
  28. Indexing/performance: cardinality?
  29. Indexing/performance: vacuum / analyze (Postgres)?
  30. SQL interview: explain CROSS JOIN.
  31. SQL interview: explain DISTINCT.
  32. Data modeling: star schema?
  33. Data modeling: 1:1 relationships?
  34. Indexing/performance: hash index?
  35. Indexing/performance: partial index?

Testing Core 3

  1. Most asked Is 100% code coverage a good goal?
  2. What is the test pyramid, and when does it not fit?
  3. Where do performance tests fit in a test strategy?

Messaging & Queues Core 5

  1. Most asked Explain at-most-once, at-least-once and exactly-once delivery.
  2. Most asked How should retries and dead-letter queues work?
  3. How do Kafka partitions and consumer groups work?
  4. How does Kafka achieve exactly-once semantics?
  5. How do you handle large payloads in messages?

Database Concurrency & Scaling Recommended 10

  1. Most asked Database CPU is at 85%. How do you decide what to optimise before buying a bigger server?
  2. Most asked A user saves their profile and the next page shows the old data. Reads go to replicas. How do you fix it?
  3. Most asked An order is saved but the 'OrderPlaced' event sometimes never reaches Kafka. How do you fix it?
  4. Most asked A Spring @Transactional method threw an exception but the data was still saved. What are the likely causes?
  5. Scale a read-heavy product catalog 100× — where do you start?
  6. Explain write skew with a real example and how to prevent it.
  7. A customer has two active subscriptions created 40 ms apart. How do you make that impossible?
  8. A viral post's like counter makes requests slow. How do you handle hot rows?
  9. A scheduled job runs on every app instance and double-bills customers. How do you fix it?
  10. A dashboard aggregates years of data on every view. How would you speed it up?

Performance & Scalability Recommended 7

  1. Most asked How do load balancers work, and what algorithms do they use?
  2. How does autoscaling work and what are its pitfalls?
  3. How does a CDN improve performance?
  4. How can garbage collection affect application performance?
  5. How can moving work to background jobs improve performance?
  6. How can serialization become a bottleneck?
  7. How do algorithm and data structure choices affect backend performance?

Logging & Observability Recommended 6

  1. How should log levels be used?
  2. How is audit logging different from application logging?
  3. Can logging hurt application performance? How do you mitigate it?
  4. How does chaos engineering relate to observability?
  5. Explain the Prometheus metric types: counter, gauge, histogram, summary.
  6. How do log rotation and retention work for services that write log files?

Web Security & WAF Recommended 4

  1. Most asked How do rate-limiting algorithms work (fixed window, sliding window, token bucket)?
  2. How do you handle file uploads securely?
  3. How should applications manage secrets?
  4. How do cookie prefixes like __Host- and __Secure- improve security?

Web Framework Internals Recommended 10

  1. Most asked Where should authentication, authorisation, validation and error formatting live in a web framework?
  2. Most asked Walk through the Laravel request lifecycle and say where you would add code that must run on every request.
  3. Most asked Walk through the Django request lifecycle.
  4. Most asked How does Express handle a request, and how are errors routed?
  5. Most asked Describe the Spring MVC request flow and where exceptions are handled.
  6. Most asked Describe Symfony's HttpKernel lifecycle and how listener priorities affect it.
  7. Most asked Describe how FastAPI processes a request and where exceptions are handled.
  8. Most asked What happens in the browser from navigation to an interactive single-page app?
  9. Walk through the Flask request lifecycle, including contexts and teardown.
  10. What happens when a request hits a Next.js App Router app?

Design Patterns Recommended 11

  1. Most asked Explain the SOLID principles.
  2. Most asked Explain the Factory Method pattern and how it differs from a simple factory.
  3. Most asked Explain the Observer pattern and give examples from real frameworks.
  4. Most asked Explain the Strategy pattern with an example.
  5. Most asked Explain the Liskov Substitution Principle with an example.
  6. Explain the Composite pattern with a real-world example.
  7. Explain Chain of Responsibility and give a web-development example.
  8. Is HTTP middleware Chain of Responsibility or Decorator?
  9. How do design patterns relate to testability?
  10. How is Mediator different from Observer?
  11. Is it a good idea to name classes after patterns, such as `PaymentStrategy` or `UserFactory`?

Docker Recommended 8

  1. Most asked How does Docker build caching work, and how do you order a Dockerfile to use it well?
  2. Most asked Volumes, bind mounts and tmpfs: when do you use each?
  3. Most asked How does Docker networking work? Explain bridge, host and user-defined networks.
  4. How do container logs work in Docker, and how do you stop them filling the disk?
  5. How do you handle configuration for containers across environments?
  6. Explain what happens when you run docker run nginx.
  7. How do you handle time zones, locales and certificates in minimal images?
  8. Docker Compose in production: is it appropriate?

FAANG / Big Tech Recommended 22

  1. Most asked Walk through time/space complexity of two-sum approaches.
  2. Most asked Explain LRU cache design.
  3. Most asked What happens when you type a URL in a browser?
  4. Give an example of customer obsession (Amazon LP).
  5. How do indexes work and when do they hurt?
  6. Explain consistent hashing and why it matters for caches.
  7. Explain eventual consistency with an example.
  8. Describe merge intervals.
  9. Describe diving deep into a metric that looked wrong.
  10. Describe a cross-team project you led.
  11. Explain App Store review and content distribution challenges.
  12. Explain how you would A/B test a ranking change safely.
  13. How do you detect and resolve split-brain?
  14. Explain quickselect for kth largest.
  15. Explain container orchestration basics (Kubernetes).
  16. How do you handle hot keys in a cache?
  17. Explain OAuth2 authorization code flow briefly.
  18. Explain MapReduce at a high level.
  19. How does Netflix think about chaos engineering?
  20. Explain Apple's emphasis on craftsmanship in interviews.
  21. Explain garbage collection at a high level.
  22. Explain bloom filters and a production use case.

Behavioral & STAR Recommended 8

  1. Most asked Describe a disagreement you had with a coworker and how you resolved it.
  2. Most asked Describe a mistake that had a significant impact and how you handled it.
  3. Most asked Describe a project you owned from start to finish.
  4. Describe a situation where you had to make a decision without all the information you wanted.
  5. Describe how you decide what to work on when everything feels urgent.
  6. Describe how you handle working on something without a clear owner.
  7. Describe your approach to onboarding a new team member.
  8. Describe how you typically respond to criticism.

Was this page helpful?

Report a mistake