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
- Most asked Which HTTP methods are safe and idempotent, and why does it matter?
- Most asked Which HTTP status codes should an API use, and when?
- Most asked Compare offset pagination and cursor (keyset) pagination.
- Most asked When would you choose GraphQL over REST, or gRPC over both?
- How do you design bulk or batch endpoints?
- PUT vs PATCH: how do you implement updates?
- What should a health or status endpoint return?
Authentication Core 7
- Most asked What is the difference between authentication and authorization?
- Most asked Compare session-based authentication with token-based (JWT) authentication.
- Most asked What are OAuth 2.0 and OpenID Connect, and how do they differ?
- What is Single Sign-On, and how do SAML and OIDC compare?
- When are API keys appropriate, and how do you manage them safely?
- Should you build authentication yourself or use an identity provider?
- Why use constant-time comparison for secrets?
Authorization Core 4
Caching Core 10
- Most asked Explain the difference between cache penetration, cache breakdown and cache avalanche.
- Most asked Should you invalidate the cache before or after the database commit?
- Redis vs Memcached: when would you choose each?
- When should you use an in-process (local) cache vs a distributed cache?
- When would you use materialized views or denormalization instead of a cache?
- Which metrics show whether a cache is working well?
- What's the difference between memoization and caching?
- How do you cache GraphQL or highly dynamic API responses?
- Is it OK to store sessions in Redis?
- Which Redis maxmemory-policy should a pure cache use, and what if sessions share the instance?
Databases & Transactions Core 5
SQL & Databases Core 5
Testing Core 2
Messaging & Queues Core 7
- Most asked Compare Kafka and RabbitMQ (and managed queues like SQS).
- What is the difference between a work queue and publish/subscribe?
- Choreography vs orchestration for multi-service workflows?
- How do you schedule delayed or future work with queues?
- When is Redis (lists or streams) good enough as a queue?
- When would you use a workflow engine like Temporal instead of plain queues?
- When should a request be handled synchronously versus asynchronously?
Database Concurrency & Scaling Recommended 6
- Most asked What's the difference between Read Committed and Repeatable Read in practice?
- When would you choose optimistic locking over SELECT … FOR UPDATE?
- What is the difference between partitioning and sharding?
- When should you NOT use SKIP LOCKED?
- What's the difference between a deadlock and a lock wait timeout?
- How does Postgres SERIALIZABLE differ from MySQL SERIALIZABLE?
Performance & Scalability Recommended 4
Logging & Observability Recommended 3
Web Security & WAF Recommended 1
Web Framework Internals Recommended 5
- Compare the shared-nothing model (PHP-FPM) with long-running application servers.
- How do synchronous workers and event loops differ in serving concurrent requests?
- When do you use a guard, an interceptor, a pipe or an exception filter in NestJS?
- Compare request handling in Laravel and Symfony.
- How does the ASP.NET Core request pipeline compare with Express or Laravel middleware?
Design Patterns Recommended 20
- Most asked What is the difference between dependency inversion, dependency injection and inversion of control?
- Most asked What is the difference between the Strategy and State patterns?
- Most asked Compare Adapter, Decorator, Proxy and Facade.
- Most asked What is the difference between Observer and Pub/Sub?
- Most asked When should you NOT use a design pattern?
- Most asked Compare Factory Method, Abstract Factory and Builder.
- When would you use the Abstract Factory pattern?
- When would you use a Decorator instead of subclassing?
- Template Method or Strategy: how do you choose?
- Which design patterns do you see in React?
- Which design patterns do Laravel and Spring use internally?
- What is the difference between Active Record and Data Mapper?
- Which design patterns does the Java standard library use?
- Which design patterns do Python features replace or simplify?
- Which design patterns do you use in PHP and Laravel day to day?
- Which design patterns are common in TypeScript and Node.js code?
- Command or Memento for undo: which would you use?
- What is the difference between Bridge and Adapter?
- How do Composite and Decorator differ, given both use recursive composition?
- When would you use a simple factory, and when a dependency injection container?
Docker Recommended 5
- Most asked What is a container, and how does it differ from a virtual machine?
- Most asked What is the difference between an image and a container, and how do image layers work?
- Most asked CMD or ENTRYPOINT: what is the difference, and what are exec and shell forms?
- Most asked ARG or ENV: what is the difference, and how do you pass secrets into a build safely?
- COPY or ADD: what is the difference?
FAANG / Big Tech Recommended 13
- Most asked Explain CAP theorem and when you choose AP vs CP.
- Most asked Explain BFS vs DFS and when to use each.
- Most asked Explain SQL vs NoSQL trade-offs.
- Most asked Explain ACID vs BASE.
- Most asked Explain microservices vs monolith trade-offs.
- Most asked What is a load balancer L4 vs L7?
- How do you handle bias for action vs needing more data?
- Explain HTTP vs HTTPS and TLS briefly.
- Compare optimistic vs pessimistic locking in concurrent edits.
- Explain optimistic vs pessimistic locking.
- Compare REST and gRPC for internal services.
- Explain blue/green vs canary deployments.
- Explain pagination strategies (offset vs cursor).