Build your own Load Balancer
A reverse proxy that spreads HTTP traffic across backends, health-checks them, and stops sending traffic to the ones that fail.
- Intermediate
- About 6–12 h
- 4 checkpoints
- 1 tutorial · Go
Pick a tutorial, then check yourself at each checkpoint. Work in any language you like.
Choose a tutorialWhy build it
Load balancers decide the availability of most web systems. Writing one makes round robin, health checks, retries and timeouts concrete, along with the failures each of them can cause.
You will be able to
- Proxy HTTP requests to a pool of backends.
- Implement round-robin and least-connections selection.
- Take unhealthy backends out of rotation with active and passive health checks.
- Choose timeouts and retries that do not amplify an outage.
Skills it exercises
Recommended on System Design and Network Engineer.
How you know you are there
Work in any language. Each checkpoint ends with something you can run or observe, so you can check it yourself.
- Checkpoint 1Self-check
Reverse proxy
Done when: Requests reach one backend and responses return unchanged, with X-Forwarded-For added.
- Checkpoint 2Self-check
Round robin
Done when: With three backends, 300 requests split 100/100/100, and logs show which backend served each one.
- Checkpoint 3Self-check
Health checks
Done when: Stopping a backend removes it from rotation within seconds, with no failed client requests after detection, and restarting it brings it back.
- Checkpoint 4Self-check
Timeouts and retries
Done when: A hanging backend is cut off by a timeout; idempotent requests are retried once on another backend, POST requests are not.
Stretch goals
- Least-connections and weighted strategies.
- Sticky sessions with consistent hashing.
- Per-backend metrics: requests, errors and latency.
Step-by-step guides
Pick one in a language you know (tutorial languages: Go). They open on the author’s site.
- Go
Let's Create a Simple Load Balancer(external site)
Go: a round-robin reverse proxy with active and passive health checks.
Where to go next
- Build your own CDN
Advanced · 10–20 h
Practice builds are self-paced: Tech Atlas does not track them or count them as evidence. To show a skill, take its knowledge check from the skill page.
Tutorials come from codecrafters-io/build-your-own-x (CC0, snapshot of 2026-07-14, commit aa17439; links checked on 2026-10-19). Each tutorial belongs to its author and keeps its own licence; Tech Atlas links to it and does not host it. Briefs, checkpoints and the mapping to skills are Tech Atlas editorial drafts.