Backend Engineer · interview questions

Backend Engineer interview questions

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

API Design Core 33

  1. Most asked What makes an API RESTful, and what are good REST design practices?
  2. Most asked Which HTTP methods are safe and idempotent, and why does it matter?
  3. Most asked Which HTTP status codes should an API use, and when?
  4. Most asked Compare offset pagination and cursor (keyset) pagination.
  5. Most asked How should you version an API?
  6. Most asked How do idempotency keys work for POST requests?
  7. Most asked Write an Express or FastAPI endpoint that creates an order idempotently.
  8. Most asked Write a SQL query that returns each customer's three most recent orders.
  9. Most asked When would you choose GraphQL over REST, or gRPC over both?
  10. An API endpoint that was fast is now taking seconds under load. Walk through your investigation.
  11. How should APIs format error responses?
  12. How do you design reliable webhooks?
  13. How should APIs support filtering, sorting and field selection?
  14. Why use OpenAPI (and contract-first design)?
  15. What counts as a breaking change in an API?
  16. How should an API communicate rate limits to clients?
  17. How do you design APIs for long-running operations?
  18. How do APIs prevent lost updates from concurrent edits?
  19. What is HATEOAS and is it used in practice?
  20. How do you design bulk or batch endpoints?
  21. What naming conventions make APIs easier to use?
  22. What security practices apply to API design?
  23. What does an API gateway do, and when do you need one?
  24. How should APIs represent dates, times and money?
  25. What makes a great developer experience for a public API?
  26. PUT vs PATCH: how do you implement updates?
  27. How do you design event-driven APIs (events between services)?
  28. How should APIs handle large file uploads and downloads?
  29. What should a health or status endpoint return?
  30. How can APIs leverage HTTP caching?
  31. How do you deprecate an API endpoint responsibly?
  32. What consistency guarantees should an API document?
  33. How do APIs handle localization?

Authentication Core 34

  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 the most common JWT security pitfalls?
  4. Most asked What are OAuth 2.0 and OpenID Connect, and how do they differ?
  5. Most asked Explain the OAuth 2.0 Authorization Code flow with PKCE.
  6. Most asked How do refresh tokens work, and how do you secure them?
  7. Most asked How should passwords be stored?
  8. Most asked What is multi-factor authentication, and which factors are strongest?
  9. Most asked How do you secure session cookies?
  10. Most asked How do you protect login endpoints from brute force and credential stuffing?
  11. How do services authenticate to each other?
  12. What are passkeys (WebAuthn) and why are they phishing-resistant?
  13. What is session fixation and how do you prevent it?
  14. Why do cookie-based sessions need CSRF protection, and how do you implement it?
  15. What is user enumeration and how do you avoid it?
  16. How do you design a secure password reset flow?
  17. What is Single Sign-On, and how do SAML and OIDC compare?
  18. What is the Backend-for-Frontend (BFF) pattern for authentication in SPAs?
  19. When are API keys appropriate, and how do you manage them safely?
  20. How do you implement logout correctly across sessions and tokens?
  21. What are OAuth scopes, and are they enough for authorization?
  22. How should mobile apps handle authentication?
  23. What signals and controls help detect account takeover?
  24. How does JWKS-based key rotation work for JWTs?
  25. What are sender-constrained tokens (DPoP, mTLS-bound tokens)?
  26. How would you implement admin impersonation safely?
  27. What are the security considerations of passwordless magic links?
  28. What does zero trust mean for authentication?
  29. Should you build authentication yourself or use an identity provider?
  30. How do you authenticate WebSocket connections?
  31. How does authentication change in multi-tenant B2B applications?
  32. Why use constant-time comparison for secrets?
  33. What is HTTP Basic authentication and when is it acceptable?
  34. How do you safely link social logins to existing accounts?

Authorization Core 30

  1. Most asked Compare RBAC, ABAC and ReBAC authorization models.
  2. Most asked What is IDOR (Insecure Direct Object Reference) and how do you prevent it?
  3. Most asked What is the principle of least privilege and how do you apply it?
  4. Most asked Where should authorization checks live in an application?
  5. Most asked How do you enforce tenant isolation in a multi-tenant SaaS?
  6. What are policy engines like OPA, Cedar or Casbin, and when would you use one?
  7. What is Google Zanzibar and how does it inspire systems like OpenFGA and SpiceDB?
  8. What is role explosion and how do you avoid it?
  9. Why should code check permissions rather than role names?
  10. How do you handle authorization in GraphQL APIs?
  11. What is mass assignment and how is it an authorization problem?
  12. How do you design privileged admin access safely?
  13. How do OAuth scopes relate to user permissions in an API?
  14. Is it enough to enforce authorization at an API gateway?
  15. How should the frontend handle permissions?
  16. How do you cache authorization decisions safely?
  17. How do you audit who has access to what?
  18. How do you model resource ownership and sharing?
  19. How does Postgres Row-Level Security work?
  20. How do you test authorization logic?
  21. Should an unauthorized request for a resource return 403 or 404?
  22. How do you implement delegated access (acting on behalf of someone)?
  23. What's the difference between feature flags and authorization?
  24. Should you put roles and permissions inside JWTs?
  25. How do you enforce authorization in background jobs and queues?
  26. How do you return only the data a user is allowed to see in list endpoints?
  27. What is the 'new enemy' problem in authorization systems?
  28. How does cloud IAM (AWS/GCP/Azure) authorization work at a high level?
  29. How do plan limits (quotas) relate to authorization?
  30. What is privilege escalation and how do you prevent it?

Caching Core 46

  1. Most asked Explain the main caching patterns: cache-aside, read-through, write-through and write-behind.
  2. Most asked Why is cache invalidation hard, and what strategies help?
  3. Most asked What is a cache stampede (thundering herd) and how do you prevent it?
  4. Most asked How does HTTP caching work (Cache-Control, ETag, CDNs)?
  5. Most asked Explain the difference between cache penetration, cache breakdown and cache avalanche.
  6. Most asked In cache-aside, why can a value be stale even though you delete the key on every write?
  7. Most asked How can a CDN leak one user's data to another, and how do you prevent it?
  8. Most asked How do you design good cache keys?
  9. Most asked What are the risks of caching personalized or authorized data?
  10. Most asked In a system design interview, how do you decide what and where to cache?
  11. Most asked Should you invalidate the cache before or after the database commit?
  12. Most asked How does stale-while-revalidate work, and when is it inappropriate?
  13. Redis vs Memcached: when would you choose each?
  14. What are cache eviction policies (LRU, LFU, TTL) and how do you choose?
  15. What are the different layers where you can cache in a web system?
  16. When should you use an in-process (local) cache vs a distributed cache?
  17. How do you handle hot keys in a distributed cache?
  18. How do you keep cache and database consistent on writes?
  19. How does Redis scale and stay available?
  20. When would you use materialized views or denormalization instead of a cache?
  21. What happens if the cache goes down, and how do you design for it?
  22. Your Redis cluster has one shard at 100% CPU while others idle. What's likely and how do you fix it?
  23. How do you keep in-process L1 caches on many pods consistent?
  24. What are the risks of write-behind caching?
  25. What must a cache key include for an API response in a multi-tenant app?
  26. Why can a Redis failover bring back deleted (stale) cache entries?
  27. How do you invalidate caches when many services and scripts write to the same tables?
  28. After adding a Redis cache, users sometimes see stale or wrong data. How do you investigate and fix it?
  29. What is negative caching and why is it useful?
  30. How do you choose a TTL?
  31. What is cache warming and when is it needed?
  32. What should you consider when serializing objects into a cache?
  33. Which metrics show whether a cache is working well?
  34. How do you invalidate content on a CDN?
  35. How would you cache high-frequency counters (views, likes) efficiently?
  36. Why are database query caches often disabled or removed?
  37. What's the difference between memoization and caching?
  38. How do you implement a distributed lock with Redis, and what are the caveats?
  39. How do you cache GraphQL or highly dynamic API responses?
  40. How do frontend applications cache server data?
  41. How does a Bloom filter help in caching systems?
  42. Is it OK to store sessions in Redis?
  43. How do you invalidate thousands of related cache keys (e.g. all pages of a category) efficiently?
  44. Why add jitter to cache TTLs?
  45. Which Redis maxmemory-policy should a pure cache use, and what if sessions share the instance?
  46. What metrics tell you a cache is healthy?

Databases & Transactions Core 30

  1. Most asked What does ACID mean?
  2. Most asked Explain transaction isolation levels and the anomalies they prevent.
  3. Most asked How do database indexes work and when do they help or hurt?
  4. Most asked What is the N+1 query problem and how do you fix it?
  5. Most asked How do you choose between SQL and NoSQL databases?
  6. Most asked What is connection pooling and how do you size a pool?
  7. Most asked How do you run schema migrations without downtime?
  8. Most asked How do you keep data consistent across services without distributed transactions?
  9. What is normalization, and when should you denormalize?
  10. Compare optimistic and pessimistic locking.
  11. What causes deadlocks and how do you handle them?
  12. How does database replication work, and what is replication lag?
  13. What are partitioning and sharding, and what are their trade-offs?
  14. How do you read a query plan and optimize a slow query?
  15. What is the transactional outbox pattern?
  16. What are the pros and cons of using an ORM?
  17. What are the trade-offs of soft deletes?
  18. Should primary keys be auto-increment integers or UUIDs?
  19. Why should data integrity be enforced in the database, not only in application code?
  20. What is MVCC and how does it affect performance?
  21. How should you back up and restore databases?
  22. How do you scale a relational database?
  23. When do you need a dedicated search engine instead of SQL LIKE queries?
  24. When is storing JSON in a relational database appropriate?
  25. Why shouldn't analytics queries run on the production OLTP database?
  26. What is read-your-writes consistency and how do you provide it?
  27. How do you perform large data updates or backfills safely?
  28. How does the CAP theorem apply to databases?
  29. What are key database security practices?
  30. How should you test database code?

SQL & Databases Core 42

  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 UNION vs UNION ALL.
  24. SQL interview: explain EXISTS vs IN.
  25. SQL interview: explain CASE expressions.
  26. SQL interview: explain dirty/nonrepeatable/phantom reads.
  27. Data modeling: denormalization?
  28. Data modeling: surrogate vs natural keys?
  29. Data modeling: OLTP vs OLAP?
  30. Data modeling: constraints?
  31. Indexing/performance: covering index?
  32. Indexing/performance: sequential vs index scan?
  33. Indexing/performance: cardinality?
  34. Indexing/performance: vacuum / analyze (Postgres)?
  35. SQL interview: explain CROSS JOIN.
  36. SQL interview: explain DISTINCT.
  37. Data modeling: star schema?
  38. Data modeling: 1:1 relationships?
  39. Indexing/performance: hash index?
  40. Indexing/performance: partial index?
  41. What are the different types of JOINs in SQL?
  42. Why are indexes important in a database?

System Design Problems Core 31

  1. Most asked Design a URL shortener (like bit.ly).
  2. Most asked Design a distributed rate limiter.
  3. Most asked Design a chat application (like WhatsApp or Slack).
  4. Most asked Design a social media news feed (like Twitter/X or Instagram).
  5. Most asked Design a notification system (email, SMS, push).
  6. Most asked Design a payment system.
  7. Most asked Design a ticket booking system (like Ticketmaster).
  8. Most asked Design a distributed unique ID generator.
  9. Most asked Design a rate limiter for a public API.
  10. Most asked Design a webhook delivery system.
  11. Most asked Design an authentication service with SSO for multiple apps.
  12. Design a file storage and sharing service (like Dropbox or Google Drive).
  13. Design search autocomplete (typeahead).
  14. Design a distributed job scheduler / task queue.
  15. Design a video streaming platform (like YouTube).
  16. Design a web crawler.
  17. Design a real-time leaderboard for a game.
  18. Design a ride-sharing service (like Uber).
  19. Design the checkout and inventory system for an e-commerce site.
  20. Design a distributed cache (like Memcached/Redis Cluster).
  21. Design a collaborative document editor (like Google Docs).
  22. Design a metrics monitoring and alerting system (like Prometheus/Datadog).
  23. Design a centralized logging pipeline.
  24. Design an API gateway.
  25. Design a distributed key-value store (like DynamoDB/Cassandra).
  26. Design Pastebin.
  27. Design a 'find nearby places' service (like Yelp).
  28. Design a feature flag service.
  29. Design a stock exchange order matching engine.
  30. Design a full-text search service for a product catalog.
  31. Design a system to count likes/views at large scale.

Testing Core 43

  1. Most asked What is the test pyramid, and is it still relevant?
  2. Most asked What makes a good unit test?
  3. Most asked What's the difference between mocks, stubs, fakes and spies?
  4. Most asked How do you write reliable integration tests that use a database?
  5. Most asked What causes flaky tests and how do you fix them?
  6. Most asked How would you design a test strategy for a new web application?
  7. Most asked Your end-to-end test suite is flaky and takes an hour. How do you fix it?
  8. Most asked Write a Playwright test that logs in and checks the dashboard, and explain how you keep it stable.
  9. Most asked Is 100% code coverage a good goal?
  10. What should end-to-end tests cover, and how do you keep them stable?
  11. What is test-driven development (TDD) and when is it useful?
  12. What is contract testing?
  13. How do you test code that depends on the current time or randomness?
  14. How do you test code that calls external HTTP services?
  15. How should you test frontend components?
  16. What is contract testing, and when would you use it?
  17. How do you test an API, and what would you automate?
  18. What is the test pyramid, and when does it not fit?
  19. How do you approach performance and load testing?
  20. A critical bug reached production even though all tests passed. What do you do?
  21. How do you manage test data for automated tests?
  22. What should block a release, and how do you report quality to stakeholders?
  23. What is mutation testing, and what does it tell you that code coverage doesn't?
  24. How do you test a feature behind a feature flag?
  25. How do you integrate automated tests into a CI/CD pipeline?
  26. What is exploratory testing, and how do you do it well?
  27. Tell me about a time you improved a team's test automation.
  28. How should you manage test data?
  29. How do you test asynchronous code?
  30. What is property-based testing?
  31. What are snapshot tests, and what are their risks?
  32. How do you prevent regressions when fixing bugs?
  33. Where do performance tests fit in a test strategy?
  34. How do you include security testing in development?
  35. What are ephemeral (preview) environments and why use them?
  36. What is chaos engineering?
  37. How do you keep a large test suite fast?
  38. How do you add tests to legacy code that wasn't designed for testing?
  39. What should API tests verify?
  40. How do you test code behind feature flags?
  41. What are smoke tests?
  42. What is mutation testing?
  43. How do you test accessibility?

Messaging & Queues Core 29

  1. Most asked Why use message queues, and what problems do they solve?
  2. Most asked Explain at-most-once, at-least-once and exactly-once delivery.
  3. Most asked How do you make message consumers idempotent?
  4. Most asked Compare Kafka and RabbitMQ (and managed queues like SQS).
  5. Most asked How should retries and dead-letter queues work?
  6. Most asked What is the dual-write problem and how do you avoid it?
  7. How do you guarantee message ordering?
  8. What is backpressure and how do message systems handle it?
  9. What is the difference between a work queue and publish/subscribe?
  10. How do you design background job processing for a web application?
  11. What are event sourcing and CQRS?
  12. How do you evolve message schemas safely?
  13. How do Kafka partitions and consumer groups work?
  14. Choreography vs orchestration for multi-service workflows?
  15. How do you schedule delayed or future work with queues?
  16. What should you monitor in a messaging system?
  17. How would you design a notification system using queues?
  18. When is Redis (lists or streams) good enough as a queue?
  19. How does Kafka achieve exactly-once semantics?
  20. How do you handle large payloads in messages?
  21. How do you test asynchronous, message-driven code?
  22. How do you implement priority processing?
  23. What is change data capture (CDC) and how is it used?
  24. When would you use a workflow engine like Temporal instead of plain queues?
  25. How do you increase throughput of message processing?
  26. When should a request be handled synchronously versus asynchronously?
  27. How do you secure message brokers?
  28. What is the inbox pattern?
  29. What is stream processing and when do you need it?

Database Concurrency & Scaling Recommended 41

  1. Most asked Two customers buy the last item at the same moment and both orders are confirmed. What happened, and how do you prevent it?
  2. Most asked After a deploy, logs show hundreds of 'deadlock detected' errors per hour on checkout. Walk through how you'd investigate.
  3. Most asked Your service throws 'connection pool exhausted' errors but database CPU is only 20%. What's going on?
  4. Most asked Why shouldn't you call a payment API inside a database transaction?
  5. Most asked What's the difference between Read Committed and Repeatable Read in practice?
  6. Most asked Database CPU is at 85%. How do you decide what to optimise before buying a bigger server?
  7. Most asked A user saves their profile and the next page shows the old data. Reads go to replicas. How do you fix it?
  8. Most asked How do you choose a shard key for a multi-tenant SaaS?
  9. Most asked How do you rename a column with zero downtime?
  10. Most asked An order is saved but the 'OrderPlaced' event sometimes never reaches Kafka. How do you fix it?
  11. Most asked How do you prevent overselling in a flash sale with 50,000 buyers in the first minute?
  12. Most asked A Spring @Transactional method threw an exception but the data was still saved. What are the likely causes?
  13. Scale a read-heavy product catalog 100× — where do you start?
  14. Explain write skew with a real example and how to prevent it.
  15. How would you prevent double-booking a meeting room?
  16. When would you choose optimistic locking over SELECT … FOR UPDATE?
  17. How do you build a reliable job queue on Postgres?
  18. A customer has two active subscriptions created 40 ms apart. How do you make that impossible?
  19. A 20 ms ALTER TABLE caused a multi-minute outage. Explain and prevent it.
  20. A viral post's like counter makes requests slow. How do you handle hot rows?
  21. How do you retry a transaction safely after a serialization failure or deadlock?
  22. How do you choose the column order of a composite index?
  23. An API's deep pages are slow and a sync job sees duplicate and missing rows. What would you change?
  24. What risks come with automatic cross-region database failover?
  25. How would you make webhook processing exactly-once from the database's point of view?
  26. A scheduled job runs on every app instance and double-bills customers. How do you fix it?
  27. Why do 'get or create' operations deadlock on MySQL under load?
  28. You have 14 services autoscaling against one Postgres and hit 'too many clients'. What's the long-term fix?
  29. A dashboard aggregates years of data on every view. How would you speed it up?
  30. How do you delete 90 days of old events every night without hurting production?
  31. Why does changing `id % 8` to `id % 12` make resharding painful, and what's the alternative?
  32. How do you generate unique IDs across database shards?
  33. How do you safely backfill 50 million rows?
  34. How do you design user-facing features on top of eventually consistent data like search indexes?
  35. What is the difference between partitioning and sharding?
  36. When should you NOT use SKIP LOCKED?
  37. Why might you avoid running reports on the primary database?
  38. What does `idle in transaction` in pg_stat_activity tell you, and why is it dangerous?
  39. What's the difference between a deadlock and a lock wait timeout?
  40. How does Postgres SERIALIZABLE differ from MySQL SERIALIZABLE?
  41. Your read replicas lag 40 seconds during a nightly import. What do you do?

Performance & Scalability Recommended 30

  1. Most asked What is the difference between vertical and horizontal scaling?
  2. Most asked What's the difference between latency and throughput?
  3. Most asked How do you approach a performance problem methodically?
  4. Most asked How do load balancers work, and what algorithms do they use?
  5. Most asked Why are timeouts, retries and circuit breakers essential for performance and reliability?
  6. Most asked What are the most common database-related performance problems?
  7. Why should application servers be stateless, and where does state go?
  8. How does autoscaling work and what are its pitfalls?
  9. What are common concurrency bottlenecks in web applications?
  10. How does a CDN improve performance?
  11. When does asynchronous I/O improve performance, and when doesn't it?
  12. How can garbage collection affect application performance?
  13. What are Core Web Vitals and how do you improve them?
  14. How do you load test a system effectively?
  15. How would you scale a read-heavy system?
  16. How would you scale a write-heavy system?
  17. How do you reduce payload sizes in web applications?
  18. How do you do capacity planning?
  19. What is the 'chatty API' problem and how do you fix it?
  20. How can moving work to background jobs improve performance?
  21. Why does tail latency matter more as systems fan out?
  22. Why does connection reuse (keep-alive, pooling) matter for performance?
  23. How can serialization become a bottleneck?
  24. What is load shedding?
  25. What is graceful degradation?
  26. What changes when you scale to multiple regions?
  27. How can adding caches or indexes hurt performance?
  28. What are cold starts and how do you reduce them?
  29. What are common mistakes when benchmarking?
  30. How do algorithm and data structure choices affect backend performance?

Logging & Observability Recommended 35

  1. Most asked What are the three pillars of observability, and how do they differ?
  2. Most asked What is structured logging and why is it preferred over plain text logs?
  3. Most asked What is a correlation (request) ID and how do you propagate it?
  4. Most asked What is distributed tracing and how does OpenTelemetry fit in?
  5. Most asked What are the RED, USE and Four Golden Signals methods?
  6. Most asked What are SLIs, SLOs and error budgets?
  7. Most asked What should never be logged, and how do you prevent it?
  8. Most asked Walk through how you would investigate a sudden latency spike in production.
  9. How should log levels be used?
  10. Why should you track latency percentiles instead of averages?
  11. What are head-based and tail-based sampling in tracing?
  12. What is metric cardinality and why can it break a monitoring system?
  13. What makes a good alert?
  14. How do you design centralized log aggregation?
  15. How is audit logging different from application logging?
  16. What does an error-tracking tool (like Sentry) add beyond logs?
  17. How would you design a service dashboard?
  18. What is the difference between liveness, readiness and startup checks?
  19. How do you collect logs and metrics in Kubernetes?
  20. What makes an error log line useful during an incident?
  21. What goes into a good blameless postmortem?
  22. Can logging hurt application performance? How do you mitigate it?
  23. What are synthetic monitoring and real-user monitoring (RUM)?
  24. How do you control the cost of logs and telemetry?
  25. What is continuous profiling and when is it useful?
  26. How do you add observability to a frontend application?
  27. How does chaos engineering relate to observability?
  28. Why should you monitor business metrics, not just technical ones?
  29. Explain the Prometheus metric types: counter, gauge, histogram, summary.
  30. How do you find slow database queries in production?
  31. How do log rotation and retention work for services that write log files?
  32. How do you observe the impact of a deployment or feature flag?
  33. What is eBPF and why is it popular for observability?
  34. How do you keep log context (user, request) in async or multi-threaded code?
  35. What's the difference between monitoring and observability?

Web Security & WAF Recommended 32

  1. Most asked What is the OWASP Top 10 and which risks does it currently highlight?
  2. Most asked What is Cross-Site Scripting (XSS) and how do you prevent it?
  3. Most asked What is SQL injection and how do you prevent it?
  4. Most asked What is CSRF and how do you defend against it?
  5. Most asked What is a Web Application Firewall (WAF), and what can and can't it do?
  6. Most asked How do rate-limiting algorithms work (fixed window, sliding window, token bucket)?
  7. Most asked What is SSRF (Server-Side Request Forgery) and how do you prevent it?
  8. How do you protect a web application from DDoS and abusive traffic?
  9. What is Content-Security-Policy and how do you roll it out?
  10. Which HTTP security headers should every web app send?
  11. What is CORS, and what are common CORS misconfigurations?
  12. How do you manage vulnerable and outdated dependencies?
  13. What are common security misconfigurations in web deployments?
  14. How do you handle file uploads securely?
  15. How should applications manage secrets?
  16. What are insecure deserialization vulnerabilities?
  17. What is clickjacking and how do you prevent it?
  18. What are best practices for TLS/HTTPS?
  19. How do you protect sign-up, login and checkout flows from bots?
  20. What is threat modeling and how do you run one?
  21. What is an open redirect vulnerability?
  22. What is command injection and how do you prevent it?
  23. What is path traversal and how do you prevent it?
  24. Why are security logging and monitoring failures in the OWASP Top 10?
  25. What are software and data integrity failures?
  26. What are common cryptographic failures?
  27. What new security risks do LLM-powered features introduce?
  28. What does the OWASP API Security Top 10 add beyond the web Top 10?
  29. How do cookie prefixes like __Host- and __Secure- improve security?
  30. How do you build security into the development lifecycle?
  31. What is XXE (XML External Entity) injection?
  32. What is subdomain takeover?

Web Framework Internals Recommended 27

  1. Most asked What is a request lifecycle, and why should a backend engineer know it for their framework?
  2. Most asked What layers does a request pass through before reaching application code, and how should their timeouts relate?
  3. Most asked Where should authentication, authorisation, validation and error formatting live in a web framework?
  4. Most asked Walk through the Laravel request lifecycle and say where you would add code that must run on every request.
  5. Most asked Walk through the Django request lifecycle.
  6. Most asked How does Express handle a request, and how are errors routed?
  7. Most asked What is the NestJS request lifecycle?
  8. Most asked Describe the Spring MVC request flow and where exceptions are handled.
  9. Most asked What is the middleware 'onion' model?
  10. Most asked Describe Symfony's HttpKernel lifecycle and how listener priorities affect it.
  11. Most asked Describe how FastAPI processes a request and where exceptions are handled.
  12. Most asked What happens in the browser from navigation to an interactive single-page app?
  13. Compare the shared-nothing model (PHP-FPM) with long-running application servers.
  14. How do synchronous workers and event loops differ in serving concurrent requests?
  15. How do you trace a single request across a load balancer, web server, application and downstream services?
  16. What state can leak between requests under Laravel Octane, and how do you prevent it?
  17. What does PHP-FPM's capacity depend on, and why can it fail with low CPU usage?
  18. Walk through the Flask request lifecycle, including contexts and teardown.
  19. When do you use a guard, an interceptor, a pipe or an exception filter in NestJS?
  20. What happens when a request hits a Next.js App Router app?
  21. Scenario: users get 504 errors but your application logs show those requests succeeding. What is happening?
  22. Scenario: after moving to an async framework, every endpoint becomes slow whenever one partner API is slow. Why?
  23. Scenario: an API returns 500 instead of 401 for expired tokens. In which frameworks have you seen this and why?
  24. Scenario: one new endpoint leaked other customers' data while forty others were fine. How do you prevent this class of bug?
  25. What runs after the response is sent, and what is it good for?
  26. Compare request handling in Laravel and Symfony.
  27. How does the ASP.NET Core request pipeline compare with Express or Laravel middleware?

Design Patterns Recommended 80

  1. Most asked What is a design pattern, and why are they useful?
  2. Most asked Explain the SOLID principles.
  3. Most asked What is the difference between dependency inversion, dependency injection and inversion of control?
  4. Most asked Why is composition often preferred over inheritance?
  5. Most asked What is dependency injection, and what forms does it take?
  6. Most asked Explain the Factory Method pattern and how it differs from a simple factory.
  7. Most asked What problem does the Builder pattern solve? Show an example.
  8. Most asked How do you implement a Singleton, and why is it often considered an anti-pattern?
  9. Most asked What is the Adapter pattern? Give an example.
  10. Most asked What is the Decorator pattern? How is it different from inheritance?
  11. Most asked Explain the Observer pattern and give examples from real frameworks.
  12. Most asked Explain the Strategy pattern with an example.
  13. Most asked What is the difference between the Strategy and State patterns?
  14. Most asked Compare Adapter, Decorator, Proxy and Facade.
  15. Most asked What is the difference between Observer and Pub/Sub?
  16. Most asked What is the Repository pattern, and when is it worth using?
  17. Most asked When should you NOT use a design pattern?
  18. Most asked Scenario: your checkout supports card and PayPal, and the business adds a new payment provider every quarter. How would you design it?
  19. Most asked What are the three categories of Gang of Four design patterns?
  20. Most asked Explain the Liskov Substitution Principle with an example.
  21. Most asked What is the Facade pattern?
  22. Most asked How would you implement undo/redo with the Command pattern?
  23. Most asked Compare Factory Method, Abstract Factory and Builder.
  24. Most asked What is MVC, and which design patterns does it combine?
  25. Most asked What is an anti-pattern? Name a few common ones.
  26. Most asked Scenario: when an order is placed, several systems (email, inventory, analytics, loyalty) must react, and more will be added. How do you design it?
  27. What does the Single Responsibility Principle mean in practice?
  28. How do you apply the Open/Closed Principle?
  29. What kinds of Proxy are there, and what does each do?
  30. What is the State pattern? When would you use it?
  31. What is the Circuit Breaker pattern?
  32. How do you safely refactor existing code toward a design pattern?
  33. What is the Interface Segregation Principle?
  34. What does "program to an interface, not an implementation" mean?
  35. What are coupling and cohesion, and how do design patterns affect them?
  36. When would you use the Abstract Factory pattern?
  37. What is the Prototype pattern, and what is the main pitfall when implementing it?
  38. What is the Bridge pattern?
  39. Explain the Composite pattern with a real-world example.
  40. Explain Chain of Responsibility and give a web-development example.
  41. What is the Iterator pattern, and how do modern languages support it?
  42. What is the Template Method pattern?
  43. When would you use a Decorator instead of subclassing?
  44. Template Method or Strategy: how do you choose?
  45. Is HTTP middleware Chain of Responsibility or Decorator?
  46. What is the Unit of Work pattern?
  47. What is CQRS, and how does it relate to the Command pattern?
  48. Which design patterns do you see in React?
  49. Which design patterns do Laravel and Spring use internally?
  50. What is the Middleware (pipeline) pattern used for?
  51. How would you refactor a god object?
  52. Why is a service locator considered worse than dependency injection?
  53. Scenario: you need undo/redo in a drawing or text editor. Which pattern would you use?
  54. Scenario: a third-party SDK you must use has a completely different interface from the rest of your code. What do you do?
  55. Scenario: a class has a constructor with ten parameters, many optional. How would you improve it?
  56. Scenario: you need to add caching and logging to an existing service without modifying it. How?
  57. Scenario: every method of an `Order` class starts with a switch on `status`. How would you refactor it?
  58. How would you explain to a junior developer how to choose the right design pattern?
  59. What is the difference between Active Record and Data Mapper?
  60. Which design patterns does the Java standard library use?
  61. Which design patterns do Python features replace or simplify?
  62. Which design patterns do you use in PHP and Laravel day to day?
  63. Which design patterns are common in TypeScript and Node.js code?
  64. How do design patterns relate to testability?
  65. What is the Flyweight pattern, and when is it worth using?
  66. What is the Mediator pattern?
  67. What is the Memento pattern?
  68. What is the Visitor pattern, and what is its main trade-off?
  69. What is the Interpreter pattern?
  70. Command or Memento for undo: which would you use?
  71. How is Mediator different from Observer?
  72. What is the difference between Bridge and Adapter?
  73. How do Composite and Decorator differ, given both use recursive composition?
  74. When would you use a simple factory, and when a dependency injection container?
  75. What is the Null Object pattern, and when can it be harmful?
  76. What is the Specification pattern?
  77. Scenario: product categories contain products and subcategories to any depth, and you need totals per category. Which pattern fits?
  78. What is the Object Pool pattern, and where do you meet it?
  79. What is the Strangler Fig pattern, and how do design patterns help with it?
  80. Is it a good idea to name classes after patterns, such as `PaymentStrategy` or `UserFactory`?

Docker Recommended 39

  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 How does Docker build caching work, and how do you order a Dockerfile to use it well?
  4. Most asked What are multi-stage builds, and why use them?
  5. Most asked CMD or ENTRYPOINT: what is the difference, and what are exec and shell forms?
  6. Most asked What are Dockerfile best practices for production images?
  7. Most asked ARG or ENV: what is the difference, and how do you pass secrets into a build safely?
  8. Most asked How do you secure Docker containers and images?
  9. Most asked Write a production Dockerfile for a Python web app: small, non-root and cache-friendly.
  10. Most asked Why does PID 1 matter in containers, and what problems can it cause?
  11. Most asked How do you make Docker images smaller?
  12. Most asked Volumes, bind mounts and tmpfs: when do you use each?
  13. Most asked How does Docker networking work? Explain bridge, host and user-defined networks.
  14. Most asked What is Docker Compose used for, and how do you handle service start-up order?
  15. Most asked How do you limit a container's CPU and memory, and what happens when it exceeds them?
  16. Most asked How should you tag Docker images, and why is 'latest' a problem?
  17. Most asked How do you debug a container that exits immediately or behaves differently in production?
  18. Most asked How do you run Docker builds in CI pipelines efficiently and safely?
  19. Most asked What is a software supply chain attack on containers, and how do you defend against it?
  20. Why is mounting the Docker socket into a container dangerous?
  21. What is BuildKit, and what does docker buildx add?
  22. COPY or ADD: what is the difference?
  23. What does HEALTHCHECK do in a Dockerfile, and do orchestrators use it?
  24. How do container logs work in Docker, and how do you stop them filling the disk?
  25. What is the OCI, and how do Docker, containerd, runc and Podman relate?
  26. What should you consider when choosing a base image?
  27. How do you handle configuration for containers across environments?
  28. What is the Docker build context, and why does it matter?
  29. Why might a container work on your laptop but fail on a server or in CI?
  30. How do you run a database in Docker for local development, and should you do it in production?
  31. How do you speed up a slow Docker build?
  32. Explain what happens when you run docker run nginx.
  33. What is Docker Swarm, and why do most teams use Kubernetes or managed services instead?
  34. What are rootless Docker and user namespaces?
  35. How do you clean up disk space used by Docker?
  36. How do you run multiple processes in one container, and should you?
  37. What changed with Docker Desktop licensing, and what are the alternatives?
  38. How do you handle time zones, locales and certificates in minimal images?
  39. Docker Compose in production: is it appropriate?

FAANG / Big Tech Recommended 102

  1. Most asked Design a URL shortener like bit.ly.
  2. Most asked Design a news feed / timeline.
  3. Most asked Design a rate limiter.
  4. Most asked Design a chat/messaging system.
  5. Most asked Explain CAP theorem and when you choose AP vs CP.
  6. Most asked Walk through time/space complexity of two-sum approaches.
  7. Most asked How do you find the longest substring without repeating characters?
  8. Most asked Explain BFS vs DFS and when to use each.
  9. Most asked Explain LRU cache design.
  10. Most asked What is dynamic programming? Give an interview example.
  11. Most asked Tell me about a time you disagreed with a technical decision.
  12. Most asked Tell me about a time you took ownership of a production issue.
  13. Most asked What happens when you type a URL in a browser?
  14. Most asked Explain SQL vs NoSQL trade-offs.
  15. Most asked How would you approach a coding interview if stuck for 5 minutes?
  16. Most asked What is consistent hashing and why use it?
  17. Most asked Explain ACID vs BASE.
  18. Most asked What is idempotency in APIs?
  19. Most asked Explain microservices vs monolith trade-offs.
  20. Most asked What is a load balancer L4 vs L7?
  21. Design a distributed cache.
  22. Describe a time you delivered under ambiguity.
  23. Give an example of customer obsession (Amazon LP).
  24. How do indexes work and when do they hurt?
  25. Design a key-value store.
  26. Tell me about a time you improved performance.
  27. Design Apple's Find My network at a high level.
  28. How would you design iMessage delivery and encryption?
  29. Design a photo library sync service like iCloud Photos.
  30. Design a push notification system for mobile apps.
  31. What is the CAP theorem and how do you apply it in practice?
  32. Explain consistent hashing and why it matters for caches.
  33. Design a video streaming CDN architecture.
  34. Design YouTube / video streaming at a high level.
  35. Design a ride-sharing matching system.
  36. How would you design autocomplete / typeahead?
  37. Design a notification system.
  38. Explain eventual consistency with an example.
  39. How do you detect a cycle in a linked list?
  40. Describe merge intervals.
  41. How do you serialize/deserialize a binary tree?
  42. How do you find median from a data stream?
  43. How do you topologically sort a graph?
  44. Describe diving deep into a metric that looked wrong.
  45. Tell me about inventing and simplifying a process.
  46. How do you earn trust with a cross-functional partner?
  47. Describe a time you had to say no to a stakeholder.
  48. Tell me about mentoring someone.
  49. What is Googleyness to you?
  50. How do you handle bias for action vs needing more data?
  51. Explain HTTP vs HTTPS and TLS briefly.
  52. How do you design for multi-region?
  53. What is a CDN and when do you need one?
  54. How do you observe a production service?
  55. Describe a cross-team project you led.
  56. How do you prioritize a backlog under pressure?
  57. How would you A/B test a ranking change?
  58. Design a search autocomplete backend for Amazon product search.
  59. What is a good behavioral example for Meta's Move Fast?
  60. How do you secure secrets in cloud apps?
  61. How would you estimate storage for a messaging app?
  62. What metrics define a healthy API?
  63. Design a distributed job queue.
  64. What questions would you ask your interviewers at FAANG?
  65. Explain App Store review and content distribution challenges.
  66. How do you design on-device ML inference with cloud fallback?
  67. Compare optimistic vs pessimistic locking in concurrent edits.
  68. How would you design a feature store for ML models?
  69. Design a distributed lock service.
  70. Explain how you would A/B test a ranking change safely.
  71. Design a searchable encrypted document store for consumer backups.
  72. How do you debug intermittent production latency spikes?
  73. Design an API gateway for a large microservices fleet.
  74. Design a real-time collaborative document editor.
  75. How would you migrate a monolith to services without downtime?
  76. Design a content moderation pipeline for user uploads.
  77. How do you secure secrets in a large engineering org?
  78. Design a metrics and alerting platform.
  79. What tradeoffs exist between SQL and NoSQL for a shopping cart?
  80. How would you interview-design a battery-efficient background sync?
  81. Design Uber-style surge pricing / marketplace matching at high level.
  82. How do you detect and resolve split-brain?
  83. Explain quickselect for kth largest.
  84. How would you design an API for a parking garage?
  85. Explain optimistic vs pessimistic locking.
  86. Explain container orchestration basics (Kubernetes).
  87. How do you handle hot keys in a cache?
  88. Explain OAuth2 authorization code flow briefly.
  89. What privacy considerations matter for mobile apps?
  90. Explain MapReduce at a high level.
  91. What is backpressure in streaming systems?
  92. How does Netflix think about chaos engineering?
  93. Explain Apple's emphasis on craftsmanship in interviews.
  94. Compare REST and gRPC for internal services.
  95. Explain blue/green vs canary deployments.
  96. Tell me about a time you gave critical feedback.
  97. How do you prepare for a bar-raiser interview?
  98. Explain pagination strategies (offset vs cursor).
  99. What is feature flagging and why use it?
  100. How do you approach object-oriented design for an elevator system?
  101. Explain garbage collection at a high level.
  102. Explain bloom filters and a production use case.

Behavioral & STAR Recommended 41

  1. Most asked Tell me about a time you worked with a difficult teammate.
  2. Most asked Describe a disagreement you had with a coworker and how you resolved it.
  3. Most asked Tell me about a time you disagreed with your manager's decision.
  4. Most asked Tell me about a time you failed at something important.
  5. Most asked Describe a mistake that had a significant impact and how you handled it.
  6. Most asked Tell me about a time you had to work with unclear or changing requirements.
  7. Most asked Tell me about a time you missed a deadline.
  8. Most asked Tell me about a time you received critical feedback and how you responded.
  9. Most asked Describe a project you owned from start to finish.
  10. Most asked Tell me about a time you had to juggle multiple competing deadlines.
  11. Tell me about a time you led a project without formal authority.
  12. Tell me about a time you took responsibility for a team failure.
  13. Describe a time you had to collaborate with someone whose working style was very different from yours.
  14. Tell me about a successful project you completed as part of a team.
  15. Tell me about a time you helped a struggling teammate.
  16. Describe a time you had to push back on a stakeholder's request.
  17. Describe a time you had to deliver unwelcome feedback to a peer.
  18. Describe a time you had to motivate a team through a difficult period.
  19. Tell me about a decision you made that was unpopular with your team.
  20. Tell me about a time you had to make a decision with incomplete information as a leader.
  21. Tell me about a project that didn't go as planned.
  22. Tell me about a time you went above and beyond your job description.
  23. Describe a time you identified a problem no one had asked you to solve.
  24. Describe a situation where you had to make a decision without all the information you wanted.
  25. Tell me about a time priorities shifted midway through a project.
  26. Describe how you decide what to work on when everything feels urgent.
  27. Tell me about a time you helped a colleague grow their skills.
  28. Tell me about a time you received feedback that was hard to hear.
  29. Describe a time you had to rely on a team member you didn't fully trust yet.
  30. Tell me about a conflict between two people on your team and how you handled it.
  31. Describe a time you delegated an important task.
  32. Tell me about a time you had to say no to your manager.
  33. Describe how you handle working on something without a clear owner.
  34. Tell me about a time you had to say no to a request to protect a deadline.
  35. Describe a time you had to deprioritize something important.
  36. Describe your approach to onboarding a new team member.
  37. Tell me about a time you gave someone feedback that changed their behavior.
  38. Describe a time you learned something valuable from someone more junior than you.
  39. Describe how you typically respond to criticism.
  40. Tell me about a time you gave feedback that was poorly received.
  41. Describe a time feedback from a peer changed how you approached your work.

Was this page helpful?

Report a mistake