You could ask ChatGPT how to learn backend development, and it would give you an answer. But I think it helps more to learn from someone who has actually done it. So in this post, I'll share how I learned backend development, and how I would start if I were a beginner again.
I won't tell you which language, framework or library to use. Tools keep changing, but the basics stay the same. Everything in this post applies no matter which tools you pick.
The roadmap has two parts. Steps 1 to 3 get you ready for your first job or internship. The steps after that help you understand each part of the backend in depth.
1.Learn a programming language and build a TODO app
I know this sounds very basic. But if you are new to computer science, this is the best place to start. My first project in college was also a TODO app.
Pick any language, any database and any framework. Then build a simple TODO app where you can add, view, edit and delete tasks. Even this small app teaches you a lot: how a request reaches the server, how the server saves data in the database, and how the response comes back to you.
Write the code yourself, without AI. Right now, the goal is to understand every line. You only get that by getting stuck and figuring things out on your own.
2.Learn data structures and algorithms
DSA trains your mind to solve hard problems. Real backend apps have a lot of complex business logic. If your problem-solving is strong, you won't be scared to turn that logic into code.
I learned DSA by solving problems on Codeforces, AtCoder and LeetCode. What helped me most was taking part in contests and then upsolving, which means going back and solving the problems I couldn't solve during the contest. If you want to get good at Codeforces, you can follow my roadmap from newbie to expert on Codeforces.
3.Build more projects
By now, you know the basics of backend development, and your problem-solving is better. Now it's time to build more.
Here are some ideas:
- a clone of an e-commerce app
- a note-taking app
- a movie recommendation app that uses an external API
Try to write these yourself as well. If placements are close and you don't have much time, you can build a project with Claude and learn every part of it. But if you are learning from zero, writing the code yourself will teach you much more.
Once you finish this step, start applying for jobs and internships. You now have the basic skills companies look for. The steps below go deeper, and you can keep learning them even after you get the job.
4.Basics of computer networks
Start with the OSI model. It splits networking into seven layers. What I find amazing is how each layer works independently: it does one job and only talks to the layer just above and below it. That idea of keeping parts separate is a good lesson in system design in itself.
Learn what each layer does. As a backend developer, you will mostly work in the top layers, from the transport layer (layer 4) up to the application layer (layer 7). If you have done step 3, you have already used the application layer. Now it's time to look one level below it:
- Learn TCP and UDP, and when to use which one.
- Learn how the TCP three-way handshake works. This is how a client and a server set up a connection.
- Write a small server using plain TCP sockets, without any framework. You will see all the work a framework quietly does for you.
To get started, you can read my article Understanding TCP and building our own TCP server in C (opens in a new tab).
5.Application-layer protocols
TCP and UDP just carry bytes from one machine to another. They don't care what those bytes mean. That job belongs to the protocols built on top of them. These are the ones I have used and think are the most important:
- HTTP/1.1
- HTTP/2
- HTTP/3
- gRPC
- WebSockets
- MQTT
There are many more, but these are the ones you will see most often. Each one is good at some things and weak at others. As a backend developer, part of your job is picking the right one for the app you are building. So for each protocol, learn what problem it was made to solve and what it gives up in return.
6.Message formats
When data travels over TCP, your app receives it as a stream of raw bytes. Before you can use it, your app needs to know two things: where one message ends, and how to read it. Every protocol solves this in its own way. For example, HTTP/1.1 uses the Content-Length header to say how long the message body is, and the Content-Type header to say what format it is in. gRPC sends its messages in a format called Protocol Buffers, over HTTP/2.
Every extra byte you send costs time, and so does converting data to and from these formats. This conversion is called serialization and deserialization. These are the formats worth learning well:
- JSON
- XML
- Protocol Buffers
- YAML
Once you understand a format, try building your own parser for it. Since you already know DSA, this won't be too hard. It will also show you why some formats are faster and smaller than others.
7.Databases in depth
The database is the most important part of your app. When an app grows, the database is usually the first thing that slows it down.
Learn these topics:
- writing fast, optimized SQL queries
- ACID properties
- indexes, and how they work under the hood
- normalization
- designing schemas that can handle growth, in both relational and document databases
Pick one relational database, like PostgreSQL, MySQL or Oracle, and one document database, like MongoDB or CouchDB. Go deep into both.
Then ask yourself: why are there so many databases? It's because each one is built for something different. Some scale easily. Some keep your data strongly consistent. Some are very fast at reads, and some are very fast at writes. Every database is good at something and weak at something else, so the right choice depends on your app. If you look inside them, you will see they are built using different data structures and design choices. Learning how they work inside is the best way to understand these tradeoffs.
Databases are a huge topic, almost a separate field of engineering. So don't worry if this step takes a long time. Keep coming back to it.
8.Caching
Caching happens everywhere. Your browser caches, your phone caches, even your CPU caches. As a backend developer, you should focus on caching inside your app and in front of your database.
There are three things to learn here.
Caching patterns. These decide how your app reads and writes data between the cache and the database:
- cache-aside
- read-through
- write-through
- write-behind (also called write-back)
- write-around
Cache invalidation. This decides when the data in the cache is too old to trust:
- time to live (TTL), where data expires after a fixed time
- explicit invalidation, where you remove data from the cache as soon as it changes in the database
Eviction policies. These decide what to throw out when the cache is full:
- LRU (least recently used)
- LFU (least frequently used)
- FIFO (first in, first out)
- random
Which ones you choose depends on your app. Ask yourself: how old can the data be before it becomes a problem? Is the data read more often than it is written? What happens if the cache goes down? Also, learn why in-memory stores like Redis are so fast, and why they are so often used for caching.
9.Message queues, streams and event-driven architecture
Some tasks take a long time, like generating a PDF or processing a video. You can't make the user wait for them. So the server accepts the request, passes the work to a background worker through a message broker, and replies to the user right away. The worker does the heavy work later.
There are two main types of message brokers:
- Message queues, like AWS SQS and RabbitMQ
- Message streams, like Amazon Kinesis and Apache Kafka
Learn how they are different and when to use each one. Then learn about the problems you will face when writing workers (also called consumers):
- Duplicate messages. Most brokers can deliver the same message more than once. So your worker should be idempotent, which means processing the same message twice should have the same result as processing it once.
- Consumer lag. If messages come in faster than your workers can handle them, the workers fall behind. Learn how to measure this lag and how to add more workers to catch up.
- Failed messages. If a message keeps failing, don't retry it forever. Move it to a dead-letter queue, so it doesn't block the messages behind it.
You can read about all of this, but it only truly makes sense when you face these problems in a real project. Most of this step, you will learn on the job.
10.Testing
As your app grows, things start breaking in places you didn't expect. Tests catch these bugs before your users do. Learn these three types:
- Unit tests check a single function or module on its own.
- Integration tests check that your code works correctly with real parts like the database or the cache.
- API tests check your endpoints from the outside, the same way a real client would call them.
One rule I like to follow is to write the test before writing the code. This is called test-driven development (TDD). It makes you think about what your code should do before you think about how to write it.
11.Proxies
A proxy is something that sits between a client and a server. There are two types:
- A forward proxy sits in front of the clients and sends requests for them.
- A reverse proxy sits in front of the servers and receives requests for them.
As a backend developer, you will mostly work with reverse proxies. They handle jobs that have nothing to do with your app's main logic, like:
- TLS termination: decrypting HTTPS traffic, so your servers don't have to.
- Routing: when you have many microservices, sending requests to the right one. For example, if the URL has
/product, the request goes to the product service. If it has/search, it goes to the search service. - Load balancing: spreading requests across many copies of the same service, so no single one gets overloaded.
Read about how proxies like Nginx, Envoy and HAProxy are built. You will learn a lot from how their engineers designed them.
12.Security
This one is very important. Anything you put on the internet will get attacked sooner or later, so you have to protect your app.
Learn how these common attacks work, and how to defend against each one:
- SQL injection
- cross-site scripting (XSS)
- cross-site request forgery (CSRF)
- distributed denial of service (DDoS)
Don't just learn which library blocks an attack. Understand why the attack works in the first place. That understanding will help you spot new attacks you haven't read about yet.
What this roadmap leaves out
I haven't covered scaling, cloud computing, observability, logging and reliability. I feel these belong more to SRE and DevOps than to core backend development, so I kept them out of this post.
Whether it's backend, machine learning or DevOps, every field in computer science needs you to keep learning. I am far from an expert in everything I mentioned here, and I still see myself as a learner.