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
- Most asked How do idempotency keys work for POST requests?
- How should APIs format error responses?
- How should APIs support filtering, sorting and field selection?
- How should an API communicate rate limits to clients?
- How do APIs prevent lost updates from concurrent edits?
- How should APIs represent dates, times and money?
- How should APIs handle large file uploads and downloads?
- How can APIs leverage HTTP caching?
- How do APIs handle localization?
Authentication Core 7
- Most asked Explain the OAuth 2.0 Authorization Code flow with PKCE.
- Most asked How do refresh tokens work, and how do you secure them?
- Most asked How should passwords be stored?
- How do services authenticate to each other?
- How should mobile apps handle authentication?
- How does JWKS-based key rotation work for JWTs?
- How does authentication change in multi-tenant B2B applications?
Authorization Core 8
- Most asked Where should authorization checks live in an application?
- How do you handle authorization in GraphQL APIs?
- How do OAuth scopes relate to user permissions in an API?
- Is it enough to enforce authorization at an API gateway?
- How should the frontend handle permissions?
- How does Postgres Row-Level Security work?
- How does cloud IAM (AWS/GCP/Azure) authorization work at a high level?
- How do plan limits (quotas) relate to authorization?
Caching Core 12
- Most asked Explain the main caching patterns: cache-aside, read-through, write-through and write-behind.
- Most asked How does HTTP caching work (Cache-Control, ETag, CDNs)?
- Most asked In cache-aside, why can a value be stale even though you delete the key on every write?
- Most asked How can a CDN leak one user's data to another, and how do you prevent it?
- Most asked In a system design interview, how do you decide what and where to cache?
- Most asked How does stale-while-revalidate work, and when is it inappropriate?
- How do you handle hot keys in a distributed cache?
- How does Redis scale and stay available?
- What happens if the cache goes down, and how do you design for it?
- How do frontend applications cache server data?
- How does a Bloom filter help in caching systems?
- How do you invalidate thousands of related cache keys (e.g. all pages of a category) efficiently?
Databases & Transactions Core 5
SQL & Databases Core 35
- Most asked SQL interview: explain INNER JOIN.
- Most asked SQL interview: explain LEFT JOIN.
- Most asked SQL interview: explain GROUP BY.
- Most asked SQL interview: explain HAVING.
- Most asked SQL interview: explain window functions.
- Most asked SQL interview: explain ACID.
- Most asked SQL interview: explain isolation levels.
- Most asked Data modeling: normalization 1NF/2NF/3NF?
- Most asked Indexing/performance: B-tree index?
- Most asked Indexing/performance: EXPLAIN / EXPLAIN ANALYZE?
- SQL interview: explain SELECT filtering.
- SQL interview: explain NULL semantics.
- SQL interview: explain transactions.
- Data modeling: primary key?
- Data modeling: foreign key?
- Data modeling: many-to-many?
- Indexing/performance: composite index?
- Indexing/performance: index write overhead?
- SQL interview: explain RIGHT / FULL JOIN.
- SQL interview: explain ORDER BY / LIMIT.
- SQL interview: explain subqueries.
- SQL interview: explain CTEs (WITH).
- SQL interview: explain CASE expressions.
- SQL interview: explain dirty/nonrepeatable/phantom reads.
- Data modeling: denormalization?
- Data modeling: constraints?
- Indexing/performance: covering index?
- Indexing/performance: cardinality?
- Indexing/performance: vacuum / analyze (Postgres)?
- SQL interview: explain CROSS JOIN.
- SQL interview: explain DISTINCT.
- Data modeling: star schema?
- Data modeling: 1:1 relationships?
- Indexing/performance: hash index?
- Indexing/performance: partial index?
Testing Core 3
Messaging & Queues Core 5
Database Concurrency & Scaling Recommended 10
- Most asked Database CPU is at 85%. How do you decide what to optimise before buying a bigger server?
- Most asked A user saves their profile and the next page shows the old data. Reads go to replicas. How do you fix it?
- Most asked An order is saved but the 'OrderPlaced' event sometimes never reaches Kafka. How do you fix it?
- Most asked A Spring @Transactional method threw an exception but the data was still saved. What are the likely causes?
- Scale a read-heavy product catalog 100× — where do you start?
- Explain write skew with a real example and how to prevent it.
- A customer has two active subscriptions created 40 ms apart. How do you make that impossible?
- A viral post's like counter makes requests slow. How do you handle hot rows?
- A scheduled job runs on every app instance and double-bills customers. How do you fix it?
- A dashboard aggregates years of data on every view. How would you speed it up?
Performance & Scalability Recommended 7
- Most asked How do load balancers work, and what algorithms do they use?
- How does autoscaling work and what are its pitfalls?
- How does a CDN improve performance?
- How can garbage collection affect application performance?
- How can moving work to background jobs improve performance?
- How can serialization become a bottleneck?
- How do algorithm and data structure choices affect backend performance?
Logging & Observability Recommended 6
- How should log levels be used?
- How is audit logging different from application logging?
- Can logging hurt application performance? How do you mitigate it?
- How does chaos engineering relate to observability?
- Explain the Prometheus metric types: counter, gauge, histogram, summary.
- How do log rotation and retention work for services that write log files?
Web Security & WAF Recommended 4
Web Framework Internals Recommended 10
- Most asked Where should authentication, authorisation, validation and error formatting live in a web framework?
- Most asked Walk through the Laravel request lifecycle and say where you would add code that must run on every request.
- Most asked Walk through the Django request lifecycle.
- Most asked How does Express handle a request, and how are errors routed?
- Most asked Describe the Spring MVC request flow and where exceptions are handled.
- Most asked Describe Symfony's HttpKernel lifecycle and how listener priorities affect it.
- Most asked Describe how FastAPI processes a request and where exceptions are handled.
- Most asked What happens in the browser from navigation to an interactive single-page app?
- Walk through the Flask request lifecycle, including contexts and teardown.
- What happens when a request hits a Next.js App Router app?
Design Patterns Recommended 11
- Most asked Explain the SOLID principles.
- Most asked Explain the Factory Method pattern and how it differs from a simple factory.
- Most asked Explain the Observer pattern and give examples from real frameworks.
- Most asked Explain the Strategy pattern with an example.
- Most asked Explain the Liskov Substitution Principle with an example.
- Explain the Composite pattern with a real-world example.
- Explain Chain of Responsibility and give a web-development example.
- Is HTTP middleware Chain of Responsibility or Decorator?
- How do design patterns relate to testability?
- How is Mediator different from Observer?
- Is it a good idea to name classes after patterns, such as `PaymentStrategy` or `UserFactory`?
Docker Recommended 8
- Most asked How does Docker build caching work, and how do you order a Dockerfile to use it well?
- Most asked Volumes, bind mounts and tmpfs: when do you use each?
- Most asked How does Docker networking work? Explain bridge, host and user-defined networks.
- How do container logs work in Docker, and how do you stop them filling the disk?
- How do you handle configuration for containers across environments?
- Explain what happens when you run docker run nginx.
- How do you handle time zones, locales and certificates in minimal images?
- Docker Compose in production: is it appropriate?
FAANG / Big Tech Recommended 22
- Most asked Walk through time/space complexity of two-sum approaches.
- Most asked Explain LRU cache design.
- Most asked What happens when you type a URL in a browser?
- Give an example of customer obsession (Amazon LP).
- How do indexes work and when do they hurt?
- Explain consistent hashing and why it matters for caches.
- Explain eventual consistency with an example.
- Describe merge intervals.
- Describe diving deep into a metric that looked wrong.
- Describe a cross-team project you led.
- Explain App Store review and content distribution challenges.
- Explain how you would A/B test a ranking change safely.
- How do you detect and resolve split-brain?
- Explain quickselect for kth largest.
- Explain container orchestration basics (Kubernetes).
- How do you handle hot keys in a cache?
- Explain OAuth2 authorization code flow briefly.
- Explain MapReduce at a high level.
- How does Netflix think about chaos engineering?
- Explain Apple's emphasis on craftsmanship in interviews.
- Explain garbage collection at a high level.
- Explain bloom filters and a production use case.
Behavioral & STAR Recommended 8
- Most asked Describe a disagreement you had with a coworker and how you resolved it.
- Most asked Describe a mistake that had a significant impact and how you handled it.
- Most asked Describe a project you owned from start to finish.
- Describe a situation where you had to make a decision without all the information you wanted.
- Describe how you decide what to work on when everything feels urgent.
- Describe how you handle working on something without a clear owner.
- Describe your approach to onboarding a new team member.
- Describe how you typically respond to criticism.