- Stage 1: one backend language deeply (Java, Go, Python or Node) plus DSA and OS/networks fundamentals.
- Stage 2: HTTP and API design: status codes, idempotency, pagination, auth, versioning.
- Stage 3: databases in depth: modelling, indexes, transactions, isolation, query plans.
- Stage 4: caching and asynchronous processing with Redis and a message queue.
- Stage 5: production readiness: tests, Docker, CI/CD, logging, metrics, tracing, failure handling.
- Stage 6: distributed systems and system design: replication, sharding, consistency, scaling patterns.
- Interview bar rises by level: SDE-1 is DSA plus fundamentals; SDE-2 adds LLD and system design; SDE-3 is decided by design depth and ownership.
A backend developer's job is to make data correct, available and fast for everyone who depends on it. That sounds simple until two users buy the last item at the same time, a downstream payment API times out halfway through a request, or a marketing campaign sends ten times the usual traffic. A good backend roadmap is really a sequence of those problems, ordered from the ones you meet on day one to the ones you meet at scale.
This roadmap has six stages. Each stage lists what to learn, why it matters in practice, and the interview questions it unlocks. If you are starting from zero with web development in general, begin with our web development roadmap and come back here once you have built a basic full-stack app.
What Backend Engineers Actually Do
Day to day, backend work at an Indian product company (think order management at a quick-commerce company, a ledger at a fintech, or a notification service at a consumer app) breaks down into:
- Designing and building APIs that other teams and the frontend consume.
- Modelling data and writing queries that stay fast as tables grow to hundreds of millions of rows.
- Integrating with other services: payment gateways, SMS providers, internal microservices.
- Making systems reliable: retries, timeouts, idempotency, graceful degradation.
- Investigating production issues with logs, metrics and traces.
- Reviewing designs and code, and writing design documents.
The roadmap below maps onto that list. Notice how little of it is framework-specific.
Stage 1: One Language and the CS Core
Choosing a backend language
| Language | Typical frameworks | Where it is common in India | Strengths |
|---|---|---|---|
| Java | Spring Boot | Fintech, banks, enterprises, GCCs, many product companies | Largest job market, mature ecosystem, strong concurrency tooling |
| Go | Standard library, Gin, Echo | Newer product companies, infrastructure and platform teams | Simple, fast, great for networked services and concurrency |
| Node.js / TypeScript | Express, Fastify, NestJS | Startups, full-stack teams | One language across stack, fast iteration |
| Python | Django, FastAPI, Flask | Data-heavy products, AI products, startups | Productivity, ML ecosystem |
| Kotlin, C#, Rust | Spring/Ktor, ASP.NET, Axum | Specific companies and teams | Strong but narrower markets in India |
If you have no constraints, Java with Spring Boot maximises the number of companies you can apply to. If you are drawn to infrastructure, Go is excellent. Whatever you choose, learn the language beyond syntax: its memory model, concurrency primitives (threads and executors in Java, goroutines and channels in Go, the event loop in Node, the GIL and asyncio in Python), error handling conventions and testing tools.
The CS core
- DSA, because interviews require it and because hash maps, heaps and trees show up in real backend code. See our DSA roadmap.
- Operating systems: processes, threads, context switching, locks, memory, file I/O. You will need these to reason about thread pools and connection pools.
- Networking: TCP, DNS, TLS, HTTP/1.1 vs HTTP/2, connection reuse, timeouts. See computer networks questions.
- Concurrency: race conditions, deadlocks, atomic operations. See multithreading and concurrency questions.
Stage 2: HTTP and API Design
Every backend engineer designs APIs, and API design questions show up in LLD and system design rounds. Go beyond CRUD:
- Resources and methods: correct use of GET, POST, PUT, PATCH, DELETE; safe vs idempotent methods.
- Status codes: 200, 201, 204, 400, 401 vs 403, 404, 409, 422, 429, 500, 503, and when each applies.
- Pagination: offset vs cursor pagination, and why cursors are stable when rows are inserted.
- Idempotency keys for operations like payments, so a client retry does not charge twice.
- Authentication and authorization: sessions, JWTs, OAuth 2.0, API keys, service-to-service auth. See OAuth2 and JWT explained.
- Versioning, rate limiting and error formats.
- Other styles: gRPC for internal services, GraphQL, WebSockets for real-time. Know when each fits.
from fastapi import FastAPI, Header, HTTPException
app = FastAPI()
@app.post("/payments", status_code=201)
def create_payment(body: PaymentRequest, idempotency_key: str = Header(...)):
# 1. Has this key been seen before? Return the original result.
existing = idempotency_store.get(idempotency_key)
if existing is not None:
if existing.request_hash != hash_request(body):
raise HTTPException(409, "Idempotency key reused with a different request")
return existing.response
# 2. Reserve the key atomically so concurrent retries cannot both proceed.
if not idempotency_store.reserve(idempotency_key, hash_request(body)):
raise HTTPException(409, "Request with this key is in progress")
# 3. Do the work, then store the response against the key.
response = payment_service.charge(body)
idempotency_store.complete(idempotency_key, response)
return response
The details interviewers probe: the key must be reserved atomically (a unique constraint in the database, or Redis SET key value NX), reusing a key with a different payload should be rejected, and stored keys need an expiry. This one pattern appears in payment, ordering and booking system design questions; see designing a UPI payment system.
Stage 3: Databases in Depth
Database knowledge is the most reliable differentiator between junior and mid-level backend engineers. Most production incidents and most performance problems trace back to the data layer.
Relational databases (PostgreSQL or MySQL)
- Schema design and normalization, and when to denormalize deliberately.
- Indexes: B-tree structure, composite index column order, covering indexes, why a function on a column defeats an index. See indexing explained.
- Reading query plans with
EXPLAIN ANALYZE. - Transactions and isolation levels: dirty reads, non-repeatable reads, phantoms, lost updates. See ACID and isolation levels.
- Locking: row locks,
SELECT ... FOR UPDATE, optimistic locking with version columns. - Connection pooling and why too many connections hurt.
-- Atomic conditional update: succeeds only if enough stock remains.
UPDATE products
SET stock = stock - :qty
WHERE id = :product_id
AND stock >= :qty;
-- Application checks the affected row count:
-- 1 row -> reservation succeeded, continue with the order
-- 0 rows -> out of stock, return 409 to the client
The naive version (read stock, check in application code, then write) lets two concurrent requests both see stock = 1 and both succeed. The conditional update makes the check and the write a single atomic operation in the database. Explaining why is a classic interview moment, and it is the foundation of flash sale and ticket booking designs like flash sale checkout.
Beyond relational
| Store type | Examples | Use when |
|---|---|---|
| Key-value / cache | Redis, Memcached | Hot reads, sessions, counters, rate limits, leaderboards |
| Document | MongoDB | Flexible schemas, aggregate-per-document access |
| Wide-column | Cassandra, ScyllaDB | Very high write throughput, time-series-like access by partition key |
| Search | Elasticsearch, OpenSearch | Full-text search, faceting, log analytics |
| Managed NoSQL | DynamoDB | Predictable key-based access at scale with low operational load |
Our database choice guide walks through how to justify a choice in an interview.
Stage 4: Caching and Asynchronous Processing
Caching
Learn the patterns and their failure modes, not just the Redis commands.
- Cache-aside (read from cache, on miss read DB and populate), write-through, write-behind.
- TTLs and invalidation strategies; why "delete on write" is usually safer than "update on write".
- Failure modes: cache stampede (thundering herd), hot keys, stale data, cache penetration for keys that do not exist.
- Redis data structures beyond strings: hashes, sorted sets, streams. See our Redis deep dive.
import json
import redis
r = redis.Redis(host="localhost", port=6379)
TTL_SECONDS = 300
def get_product(product_id: int) -> dict:
key = f"product:{product_id}"
cached = r.get(key)
if cached is not None:
return json.loads(cached)
product = db.fetch_product(product_id) # source of truth
if product is not None:
r.set(key, json.dumps(product), ex=TTL_SECONDS)
return product
def update_product(product_id: int, fields: dict) -> None:
db.update_product(product_id, fields)
r.delete(f"product:{product_id}") # invalidate, next read refills
Asynchronous processing and messaging
- Why some work should leave the request path: emails, notifications, report generation, video processing.
- Queues vs logs: RabbitMQ/SQS style vs Kafka style. See Kafka vs RabbitMQ vs SQS.
- Delivery semantics: at-most-once, at-least-once, and why "exactly once" usually means at-least-once plus idempotent consumers.
- Retries with exponential backoff and jitter, dead-letter queues, poison messages.
- The outbox pattern for publishing events reliably alongside a database write.
Stage 5: Production Readiness
Code that works on your laptop and code that survives production are different things. This stage is what mid-level engineers are trusted with.
| Area | Learn | Why it matters |
|---|---|---|
| Testing | Unit, integration (with real databases in containers), contract tests | Refactoring safely; catching data-layer bugs |
| Containers | Dockerfiles, multi-stage builds, image size, health checks | How almost every service ships; see Docker and Kubernetes for backend engineers |
| CI/CD | Pipelines, automated tests, blue-green and canary deploys, rollbacks | Shipping often without breaking things |
| Observability | Structured logs, metrics (RED/USE), distributed tracing, alerts on symptoms | Debugging production; see observability explained |
| Resilience | Timeouts, retries, circuit breakers, bulkheads, graceful degradation | One slow dependency should not take you down; see resilience patterns |
| Security | Secrets management, input validation, least privilege, OWASP Top 10 | Avoiding the incidents that end careers |
| Cloud basics | Compute, managed databases, object storage, IAM on one cloud | Most Indian companies run on AWS, GCP or Azure |
Stage 6: Distributed Systems and System Design
This is where backend engineering meets the system design interview. You do not need to have built a system for a hundred million users to reason about one, but you do need the vocabulary and the trade-offs.
- Scaling: vertical vs horizontal, stateless services, load balancing.
- Replication: leader-follower, read replicas, replication lag and read-your-writes.
- Partitioning: sharding strategies, consistent hashing, hot partitions. See sharding strategies.
- Consistency: CAP and PACELC, eventual consistency, quorums. See CAP theorem for interviews.
- Distributed transactions: why two-phase commit is avoided, sagas, compensation. See saga pattern.
- Architecture choices: monolith vs microservices, event-driven designs, CQRS.
- Estimation: QPS, storage, bandwidth. See back-of-the-envelope estimation.
Practise on the classic problems: URL shortener, rate limiter, notification service, news feed, chat, and India-flavoured ones like IRCTC Tatkal booking and food delivery. Our system design for beginners roadmap sequences them.
Projects That Prove Each Stage
| Stage | Project | What to measure and explain |
|---|---|---|
| 1–2 | URL shortener with custom aliases, expiry and click analytics API | ID generation strategy, collision handling, correct status codes |
| 3 | Order service with inventory, concurrent purchases and order history | Proof that concurrent orders never oversell; query plans for history |
| 4 | Add Redis caching and an async notification worker | Cache hit ratio, p95 latency before and after, retry behaviour |
| 5 | Containerize, add CI, metrics dashboard and tracing | A dashboard screenshot; a deliberate failure and how you detected it |
| 6 | Rate-limited public API or a mini message queue | Load test results (k6 or similar), behaviour under overload |
One project evolved through all six stages is often better than six separate ones: it tells a coherent story in interviews ("I started with a single Postgres instance, found the history query was slow at 2 million rows, added a composite index and then a cache...").
A Realistic Timeline
The stages overlap in practice, and DSA runs in parallel throughout. Here is a plan for someone who can already program and has about 15 hours a week, for example a student in pre-final year or a services engineer planning a switch.
| Months | Backend focus | DSA in parallel | Milestone |
|---|---|---|---|
| 1–2 | Language depth, HTTP, first REST API | Arrays, hashing, two pointers, binary search | URL shortener deployed |
| 3–4 | SQL, indexing, transactions, ORM | Linked lists, stacks, trees | Order service with concurrency test |
| 5–6 | Redis, queues, background workers | Heaps, graphs | Caching and async notifications added |
| 7 | Docker, CI, observability | DP | Dashboards and a load test report |
| 8–9 | System design fundamentals, LLD practice | Revision, mock interviews | Applying with a coherent project story |
If you are a working engineer, map these stages onto your job. Volunteer for the ticket that touches the slow query, the caching layer or the on-call runbook. Real production exposure in one of these areas is worth more than a side project covering the same ground, and it gives you better interview stories.
How to talk about backend work in interviews
Interviewers listen for whether you understand the system, not just your ticket. For any project or work item, prepare to cover: the request flow end to end, the data model and its indexes, one failure you handled (or should have), one measurable improvement you made, and one thing you would design differently now. A crisp version of this beats a long list of technologies. Our guide on explaining projects in interviews has a template.
Backend Interview Expectations by Level
Processes vary by company, so confirm specifics with your recruiter. The general shape at Indian product companies and big tech:
| Level | Typical rounds | What decides the outcome |
|---|---|---|
| Fresher / SDE-1 (0–2 yrs) | OA, 2 DSA rounds, CS fundamentals or project round, sometimes LLD/machine coding | DSA performance, clean code, solid DBMS/OS/networks basics |
| SDE-2 (2–5 yrs) | DSA, LLD or machine coding, system design (HLD), hiring manager | LLD quality, reasonable HLD with trade-offs, ownership in past projects |
| SDE-3 / Senior (5+ yrs) | DSA (fewer), deep system design, LLD, leadership/behavioral | Design depth, handling ambiguity, influence and mentoring stories |
Backend questions that come up again and again
- "Two users try to book the last seat. What happens in your system?"
- "Your API's p99 latency doubled after a deploy. How do you investigate?"
- "How would you make this endpoint idempotent?"
- "Why did you choose PostgreSQL? When would you not?"
- "How does your cache stay consistent with the database?"
- "What happens if the message consumer crashes halfway through processing?"
- Language-specific: Spring Boot internals, Java concurrency, Go goroutines, Node's event loop. See Spring Boot questions, Go questions and Node.js questions.
For LLD rounds, practise designs like a parking lot or an in-memory key-value store with transactions, which are backend-flavoured and commonly asked.
Common Backend Roadmap Mistakes
- Framework first, fundamentals never. Knowing Spring annotations without understanding HTTP, SQL or threads leaves you stuck the first time something breaks below the framework.
- Microservices before monoliths. Splitting a toy app into eight services teaches distributed debugging pain, not design. Build a well-structured monolith first.
- Treating the database as a black box behind an ORM. Learn the SQL your ORM generates and read query plans.
- Ignoring failure paths. Most backend complexity lives in timeouts, retries, partial failures and duplicates. Practise designing for them.
- Memorizing system design answers. Interviewers change constraints mid-way. Learn the trade-offs so you can adapt.
- Skipping DSA because "backend is practical". Product company interviews still test it at every level.
Frequently Asked Questions
Build Backend Depth That Interviews Reward
Prepflix covers DSA, LLD and system design for backend engineers, with real case studies of how Indian product companies scale their services.
Explore the Prepflix Course →