Role preparation

Backend Developer interview questions and answers.

Service design, data integrity, reliability, and operations.

Questions

Technical questions to practise out loud

  1. 01

    How do database indexes work?

    A database index is a data structure that speeds qualifying reads by avoiding a full scan, at the cost of storage and slower writes. Choose it from real predicates, joins, ordering, and selectivity, then verify the plan.

    Read the full breakdown
  2. 02

    How do transaction isolation levels differ?

    Isolation determines which concurrent effects a transaction may observe. Stronger levels prevent more anomalies but can reduce concurrency; select the lowest level that preserves the business invariant.

    Read the full breakdown
  3. 03

    How do you design an idempotent API?

    An idempotent write can be retried without creating another business effect. Store an idempotency key with the request result or business identifier and return the original result for a duplicate.

    Read the full breakdown
  4. 04

    How do you define service boundaries?

    A service boundary should own a cohesive business capability, its data and invariants. Split by independent change and failure domains, not merely by database tables or team names.

    Read the full breakdown
  5. 05

    How do you version a public API?

    Version only when a change breaks existing clients. Prefer additive fields and tolerant readers; when a breaking change is necessary, publish a new contract, migration window, and deprecation date.

    Read the full breakdown
  6. 06

    When would you add a cache?

    Cache data that is expensive to compute and tolerates bounded staleness. Define the source of truth, key, TTL, invalidation path, and behaviour when the cache is empty or unavailable.

    Read the full breakdown
  7. 07

    When do you use a message queue?

    Use a queue when work can be asynchronous, retried, or smoothed under load. Consumers must be idempotent because delivery can be duplicated or delayed.

    Read the full breakdown
  8. 08

    How do you implement rate limiting?

    Rate limiting protects a finite resource by defining scope, window, burst and response behaviour. Apply it at the earliest trusted boundary and return clear retry information.

    Read the full breakdown
  9. 09

    What observability does a backend service need?

    A backend needs structured logs, metrics for rates/errors/latency, distributed traces, and correlation IDs. Instrument business-critical paths so an alert leads to a diagnosable question.

    Read the full breakdown
  10. 10

    How do you ship database migrations safely?

    Ship migrations in compatible steps: add first, deploy code that handles both shapes, backfill safely, switch reads, then remove obsolete fields later. Keep locks and transactions short.

    Read the full breakdown