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
- Most asked What makes an API RESTful, and what are good REST design practices?
- Most asked How should you version an API?
- How do you design reliable webhooks?
- How do you design APIs for long-running operations?
- What makes a great developer experience for a public API?
- How do you design event-driven APIs (events between services)?
- How do you deprecate an API endpoint responsibly?
Authentication Core 7
- Most asked How do you secure session cookies?
- Most asked How do you protect login endpoints from brute force and credential stuffing?
- How do you design a secure password reset flow?
- How do you implement logout correctly across sessions and tokens?
- How would you implement admin impersonation safely?
- How do you authenticate WebSocket connections?
- How do you safely link social logins to existing accounts?
Authorization Core 9
- Most asked How do you enforce tenant isolation in a multi-tenant SaaS?
- How do you design privileged admin access safely?
- How do you cache authorization decisions safely?
- How do you audit who has access to what?
- How do you model resource ownership and sharing?
- How do you test authorization logic?
- How do you implement delegated access (acting on behalf of someone)?
- How do you enforce authorization in background jobs and queues?
- How do you return only the data a user is allowed to see in list endpoints?
Caching Core 8
- Most asked How do you design good cache keys?
- How do you invalidate caches when many services and scripts write to the same tables?
- How do you choose a TTL?
- What should you consider when serializing objects into a cache?
- How do you invalidate content on a CDN?
- How would you cache high-frequency counters (views, likes) efficiently?
- How do you implement a distributed lock with Redis, and what are the caveats?
- What metrics tell you a cache is healthy?
Databases & Transactions Core 6
- Most asked How do you choose between SQL and NoSQL databases?
- Most asked How do you run schema migrations without downtime?
- What causes deadlocks and how do you handle them?
- How do you read a query plan and optimize a slow query?
- How should you back up and restore databases?
- How should you test database code?
Testing Core 19
- Most asked What makes a good unit test?
- Most asked How do you write reliable integration tests that use a database?
- Most asked What causes flaky tests and how do you fix them?
- How do you test code that depends on the current time or randomness?
- How do you test code that calls external HTTP services?
- How should you test frontend components?
- How do you test an API, and what would you automate?
- How do you approach performance and load testing?
- How do you manage test data for automated tests?
- What should block a release, and how do you report quality to stakeholders?
- How do you test a feature behind a feature flag?
- How do you integrate automated tests into a CI/CD pipeline?
- How should you manage test data?
- How do you test asynchronous code?
- How do you prevent regressions when fixing bugs?
- How do you include security testing in development?
- How do you add tests to legacy code that wasn't designed for testing?
- How do you test code behind feature flags?
- How do you test accessibility?
Messaging & Queues Core 9
- Most asked How do you make message consumers idempotent?
- How do you guarantee message ordering?
- How do you design background job processing for a web application?
- How do you evolve message schemas safely?
- What should you monitor in a messaging system?
- How do you test asynchronous, message-driven code?
- How do you implement priority processing?
- How do you increase throughput of message processing?
- How do you secure message brokers?
Database Concurrency & Scaling Recommended 12
- Most asked How do you choose a shard key for a multi-tenant SaaS?
- Most asked How do you rename a column with zero downtime?
- Most asked How do you prevent overselling in a flash sale with 50,000 buyers in the first minute?
- How would you prevent double-booking a meeting room?
- How do you build a reliable job queue on Postgres?
- How do you retry a transaction safely after a serialization failure or deadlock?
- How do you choose the column order of a composite index?
- How would you make webhook processing exactly-once from the database's point of view?
- How do you delete 90 days of old events every night without hurting production?
- How do you generate unique IDs across database shards?
- How do you safely backfill 50 million rows?
- How do you design user-facing features on top of eventually consistent data like search indexes?
Performance & Scalability Recommended 6
Logging & Observability Recommended 8
- What makes a good alert?
- How do you design centralized log aggregation?
- How do you collect logs and metrics in Kubernetes?
- What makes an error log line useful during an incident?
- How do you control the cost of logs and telemetry?
- How do you add observability to a frontend application?
- How do you find slow database queries in production?
- How do you observe the impact of a deployment or feature flag?
Web Security & WAF Recommended 4
Web Framework Internals Recommended 1
Design Patterns Recommended 6
- Most asked How do you implement a Singleton, and why is it often considered an anti-pattern?
- Most asked How would you implement undo/redo with the Command pattern?
- How do you apply the Open/Closed Principle?
- How do you safely refactor existing code toward a design pattern?
- How would you refactor a god object?
- How would you explain to a junior developer how to choose the right design pattern?
Docker Recommended 11
- Most asked How do you secure Docker containers and images?
- Most asked How do you make Docker images smaller?
- Most asked How do you limit a container's CPU and memory, and what happens when it exceeds them?
- Most asked How should you tag Docker images, and why is 'latest' a problem?
- Most asked How do you debug a container that exits immediately or behaves differently in production?
- Most asked How do you run Docker builds in CI pipelines efficiently and safely?
- What should you consider when choosing a base image?
- How do you run a database in Docker for local development, and should you do it in production?
- How do you speed up a slow Docker build?
- How do you clean up disk space used by Docker?
- How do you run multiple processes in one container, and should you?
FAANG / Big Tech Recommended 20
- Most asked How do you find the longest substring without repeating characters?
- Most asked How would you approach a coding interview if stuck for 5 minutes?
- How do you detect a cycle in a linked list?
- How do you serialize/deserialize a binary tree?
- How do you find median from a data stream?
- How do you topologically sort a graph?
- How do you earn trust with a cross-functional partner?
- How do you design for multi-region?
- How do you observe a production service?
- How do you prioritize a backlog under pressure?
- How would you A/B test a ranking change?
- How do you secure secrets in cloud apps?
- How would you estimate storage for a messaging app?
- What metrics define a healthy API?
- How do you design on-device ML inference with cloud fallback?
- How would you migrate a monolith to services without downtime?
- How do you secure secrets in a large engineering org?
- How would you interview-design a battery-efficient background sync?
- How do you prepare for a bar-raiser interview?
- How do you approach object-oriented design for an elevator system?