Backend Engineer · interview questions

Backend Engineer interview questions: comparison

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 Which HTTP methods are safe and idempotent, and why does it matter?
  2. Most asked Which HTTP status codes should an API use, and when?
  3. Most asked Compare offset pagination and cursor (keyset) pagination.
  4. Most asked When would you choose GraphQL over REST, or gRPC over both?
  5. How do you design bulk or batch endpoints?
  6. PUT vs PATCH: how do you implement updates?
  7. What should a health or status endpoint return?

Authentication Core 7

  1. Most asked What is the difference between authentication and authorization?
  2. Most asked Compare session-based authentication with token-based (JWT) authentication.
  3. Most asked What are OAuth 2.0 and OpenID Connect, and how do they differ?
  4. What is Single Sign-On, and how do SAML and OIDC compare?
  5. When are API keys appropriate, and how do you manage them safely?
  6. Should you build authentication yourself or use an identity provider?
  7. Why use constant-time comparison for secrets?

Authorization Core 4

  1. Most asked Compare RBAC, ABAC and ReBAC authorization models.
  2. Should an unauthorized request for a resource return 403 or 404?
  3. What's the difference between feature flags and authorization?
  4. Should you put roles and permissions inside JWTs?

Caching Core 10

  1. Most asked Explain the difference between cache penetration, cache breakdown and cache avalanche.
  2. Most asked Should you invalidate the cache before or after the database commit?
  3. Redis vs Memcached: when would you choose each?
  4. When should you use an in-process (local) cache vs a distributed cache?
  5. When would you use materialized views or denormalization instead of a cache?
  6. Which metrics show whether a cache is working well?
  7. What's the difference between memoization and caching?
  8. How do you cache GraphQL or highly dynamic API responses?
  9. Is it OK to store sessions in Redis?
  10. Which Redis maxmemory-policy should a pure cache use, and what if sessions share the instance?

Databases & Transactions Core 5

  1. Compare optimistic and pessimistic locking.
  2. Should primary keys be auto-increment integers or UUIDs?
  3. When do you need a dedicated search engine instead of SQL LIKE queries?
  4. When is storing JSON in a relational database appropriate?
  5. How do you perform large data updates or backfills safely?

SQL & Databases Core 5

  1. SQL interview: explain UNION vs UNION ALL.
  2. SQL interview: explain EXISTS vs IN.
  3. Data modeling: surrogate vs natural keys?
  4. Data modeling: OLTP vs OLAP?
  5. Indexing/performance: sequential vs index scan?

Testing Core 2

  1. Most asked What's the difference between mocks, stubs, fakes and spies?
  2. What is mutation testing, and what does it tell you that code coverage doesn't?

Messaging & Queues Core 7

  1. Most asked Compare Kafka and RabbitMQ (and managed queues like SQS).
  2. What is the difference between a work queue and publish/subscribe?
  3. Choreography vs orchestration for multi-service workflows?
  4. How do you schedule delayed or future work with queues?
  5. When is Redis (lists or streams) good enough as a queue?
  6. When would you use a workflow engine like Temporal instead of plain queues?
  7. When should a request be handled synchronously versus asynchronously?

Database Concurrency & Scaling Recommended 6

  1. Most asked What's the difference between Read Committed and Repeatable Read in practice?
  2. When would you choose optimistic locking over SELECT … FOR UPDATE?
  3. What is the difference between partitioning and sharding?
  4. When should you NOT use SKIP LOCKED?
  5. What's the difference between a deadlock and a lock wait timeout?
  6. How does Postgres SERIALIZABLE differ from MySQL SERIALIZABLE?

Performance & Scalability Recommended 4

  1. Most asked What is the difference between vertical and horizontal scaling?
  2. Most asked What's the difference between latency and throughput?
  3. When does asynchronous I/O improve performance, and when doesn't it?
  4. How can adding caches or indexes hurt performance?

Logging & Observability Recommended 3

  1. Most asked What are the three pillars of observability, and how do they differ?
  2. What is the difference between liveness, readiness and startup checks?
  3. What's the difference between monitoring and observability?

Web Security & WAF Recommended 1

  1. Which HTTP security headers should every web app send?

Web Framework Internals Recommended 5

  1. Compare the shared-nothing model (PHP-FPM) with long-running application servers.
  2. How do synchronous workers and event loops differ in serving concurrent requests?
  3. When do you use a guard, an interceptor, a pipe or an exception filter in NestJS?
  4. Compare request handling in Laravel and Symfony.
  5. How does the ASP.NET Core request pipeline compare with Express or Laravel middleware?

Design Patterns Recommended 20

  1. Most asked What is the difference between dependency inversion, dependency injection and inversion of control?
  2. Most asked What is the difference between the Strategy and State patterns?
  3. Most asked Compare Adapter, Decorator, Proxy and Facade.
  4. Most asked What is the difference between Observer and Pub/Sub?
  5. Most asked When should you NOT use a design pattern?
  6. Most asked Compare Factory Method, Abstract Factory and Builder.
  7. When would you use the Abstract Factory pattern?
  8. When would you use a Decorator instead of subclassing?
  9. Template Method or Strategy: how do you choose?
  10. Which design patterns do you see in React?
  11. Which design patterns do Laravel and Spring use internally?
  12. What is the difference between Active Record and Data Mapper?
  13. Which design patterns does the Java standard library use?
  14. Which design patterns do Python features replace or simplify?
  15. Which design patterns do you use in PHP and Laravel day to day?
  16. Which design patterns are common in TypeScript and Node.js code?
  17. Command or Memento for undo: which would you use?
  18. What is the difference between Bridge and Adapter?
  19. How do Composite and Decorator differ, given both use recursive composition?
  20. When would you use a simple factory, and when a dependency injection container?

Docker Recommended 5

  1. Most asked What is a container, and how does it differ from a virtual machine?
  2. Most asked What is the difference between an image and a container, and how do image layers work?
  3. Most asked CMD or ENTRYPOINT: what is the difference, and what are exec and shell forms?
  4. Most asked ARG or ENV: what is the difference, and how do you pass secrets into a build safely?
  5. COPY or ADD: what is the difference?

FAANG / Big Tech Recommended 13

  1. Most asked Explain CAP theorem and when you choose AP vs CP.
  2. Most asked Explain BFS vs DFS and when to use each.
  3. Most asked Explain SQL vs NoSQL trade-offs.
  4. Most asked Explain ACID vs BASE.
  5. Most asked Explain microservices vs monolith trade-offs.
  6. Most asked What is a load balancer L4 vs L7?
  7. How do you handle bias for action vs needing more data?
  8. Explain HTTP vs HTTPS and TLS briefly.
  9. Compare optimistic vs pessimistic locking in concurrent edits.
  10. Explain optimistic vs pessimistic locking.
  11. Compare REST and gRPC for internal services.
  12. Explain blue/green vs canary deployments.
  13. Explain pagination strategies (offset vs cursor).

Was this page helpful?

Report a mistake