Backend Interview Course

A structured backend interview course covering APIs, HTTP, databases, caching, queues, security, scaling, and system design with linked practice questions.

Level: Backend Interview Difficulty: intermediate 5 lessons 60 min
Course progress 0 / 5
Back to courses

What you will learn

  • Understand backend interview formats.
  • Design REST APIs and explain HTTP behavior.
  • Choose databases and reason about transactions.
  • Use caching, queues, and security best practices.
  • Scale services and explain system design tradeoffs.

Before you start

  • Basic programming and HTTP knowledge is helpful.
  • Familiarity with databases and APIs is recommended.
  • Building small services helps practice.

Lesson 1 Understanding the Backend Interview

Backend interviews test APIs, HTTP, databases, caching, queues, security, scaling, and system design. Candidates explain concepts, design small systems, and reason about tradeoffs. A strong study path starts with HTTP and REST APIs, then databases and transactions, then caching and message queues, then security, and finally scaling and architecture. You should be able to explain status codes, idempotency, indexes, ACID, cache invalidation, authentication, and load balancing. Interviewers value structured thinking: clarify requirements, name components, discuss tradeoffs, and identify bottlenecks. This course organizes these topics into five lessons and links to a practice bank with 60 original questions to help you review before interviews.

Example

Example: Explain idempotency and status codes when designing a payment API.

Lesson 2 APIs and HTTP

REST APIs use resources, HTTP methods, and stateless communication. GET retrieves data, POST creates, PUT updates, and DELETE removes. Status codes communicate results: 200 OK, 201 created, 400 bad request, 401 unauthorized, 404 not found, 429 too many requests, and 500 server error. Idempotent operations can be repeated safely, so payment and retry APIs often use idempotency keys. API versioning lets you change behavior without breaking clients, usually through URL paths or headers. Rate limiting protects services by restricting requests per client, and webhooks push events to servers asynchronously. JSON is the most common data format. Interviewers often ask you to design a small REST API, so practice naming resources, choosing methods, and defining error responses.

Example

Example: POST /payments creates a payment and returns 201 with the resource location.

Lesson 3 Databases and Data Storage

Database questions cover relational and NoSQL models, transactions, indexes, and scaling. Relational databases use tables, primary keys, and foreign keys. Normalization reduces redundancy, while denormalization can improve read performance. Transactions follow ACID: atomicity, consistency, isolation, and durability. Indexes speed up reads but can slow writes. NoSQL databases include document stores such as MongoDB, key-value stores such as Redis, and graph databases. Sharding splits data across servers, and replication copies data to replicas for availability. Connection pools reuse connections, and ORMs map objects to rows. Migrations manage schema changes, and query plans show how queries execute. Interviewers want you to choose the right storage for the workload and explain tradeoffs.

Example

Example: Add an index on user_id to speed up lookups of a user orders table.

Lesson 4 Caching, Queues, and Security

Caching stores frequently used data close to the caller to reduce latency. Common patterns include cache-aside, read-through, and write-through. Cache invalidation keeps stale data from being served. A CDN caches content at edge locations. Message queues enable asynchronous communication between services, and publish/subscribe decouples producers from consumers. Dead letter queues capture messages that fail repeatedly. Security topics include authentication, authorization, hashing, JWTs, TLS, and CSRF. Authentication verifies identity, while authorization checks permissions. Passwords should be hashed with salts, not stored in plaintext. TLS encrypts traffic, and CSRF tokens prevent forged requests. Interviewers expect practical advice about when to cache, how to retry, and how to secure an API.

Example

Example: Use cache-aside for user profiles and invalidate the key when the profile changes.

Lesson 5 Scaling, System Design, and Strategy

System design questions ask you to scale services and explain architecture. Horizontal scaling adds more servers, while vertical scaling adds resources to one server. Load balancers distribute traffic, reverse proxies front backend servers, and API gateways centralize routing and auth. Stateless services scale more easily because clients do not depend on server memory. Microservices are independently deployable, while monoliths package everything together. Availability measures uptime, latency measures response time, and throughput measures capacity. Circuit breakers stop calls to failing services, and graceful degradation keeps partial functionality. Eventual consistency means replicas converge over time. Observability uses logs, metrics, and traces. Interviewers want a clear structure: requirements, components, data flow, bottlenecks, and tradeoffs.

Example

Example: Put a load balancer in front of stateless API servers and add a cache for hot reads.