Subtracks & Tasks
TCP From Scratch
Build a TCP Echo Server from Raw Syscalls
Build a TCP echo server using raw syscalls. No standard library network abstractions allowed. The server should: 1. Create a socket using `socket(AF_...
Add a Connection Pool with Configurable Backlog
Extend your TCP server to accept up to N concurrent connections. When N is exceeded, queue new connections in a backlog. If the backlog is also full, ...
Implement Graceful Shutdown with In-Flight Drain
Implement graceful shutdown: when the server receives a shutdown signal, it should drain all in-flight requests before closing sockets. New connection...
Implement Application-Level TCP Keep-Alive
Implement application-level TCP keep-alive detection. If a client goes silent for more than 30 seconds, detect it and close the connection. Use period...
Benchmark Server Throughput and Latency
Measure your TCP server's throughput (requests/sec) and latency (p50, p95, p99). Profile where the bottleneck is. Implement a benchmark framework: `...
Message Framing and Serialization
Implement Length-Prefixed Message Framing
TCP is a byte stream, not a message protocol. You need framing to know where one message ends and the next begins. Length-prefixed framing prepends ea...
Implement Line-Delimited Framing (Redis RESP Style)
Implement line-delimited framing where messages end with `\r\n`. This is the approach used by Redis RESP, HTTP/1.1 headers, and SMTP. The challenge: ...
Implement a Binary Serialization Format
Implement a binary serialization format (similar to MessagePack). Support four types: integers, strings, arrays, and maps. Compare size and performanc...
Add Message Compression with CPU-Bandwidth Tradeoff Analysis
Add compression to your message framing. Benchmark the CPU vs bandwidth tradeoff at different payload sizes to determine when compression helps versus...
Implement Protocol Versioning with Backward Compatibility
Implement a protocol versioning scheme. The sender includes a `protocol_version` in the header. The receiver handles backward compatibility for older ...
gRPC and Protocol Buffers
Define and Encode Protocol Buffer Messages
Protocol Buffers use a schema definition (.proto file) and a compact binary wire format. Each field has a number, type, and wire encoding. Wire forma...
Implement a gRPC Unary RPC Service
Implement a gRPC-style unary RPC service. In unary RPC, the client sends exactly one request and receives exactly one response. gRPC message format o...
Implement gRPC Server and Bidirectional Streaming
Implement gRPC streaming RPCs: 1. **Server streaming**: Client sends one request, server sends a stream of responses 2. **Bidirectional streaming**: ...
Build gRPC Interceptors for Logging, Auth, and Rate Limiting
Build a gRPC interceptor pipeline. Interceptors are middleware that wrap gRPC handler calls, running logic before and after the actual service method....
Compare gRPC vs REST: Latency, Size, and DX
Compare gRPC and REST across multiple dimensions. Build both a REST-style and gRPC-style endpoint for the same service and measure the differences. I...
Interview Prep
Common interview questions for Backend / Systems Engineer roles that map directly to what you build in this track. Click any question to reveal the model answer.
Questions are representative of real interview patterns. Model answers are starting points — adapt them with your own experience and the specific context of the interview.
Common Mistakes
The top 5 mistakes builders make in this track — and exactly how to fix them. Click any mistake to see the root cause and the correct approach.
Comparison Mode
Side-by-side comparisons of the approaches, algorithms, and trade-offs you encounter in this track. Expand any comparison to see a detailed breakdown.
Concepts Covered
Prerequisites
It is recommended to complete the previous tracks before starting this one. Concepts build progressively throughout the curriculum.
Rabbit Holes
For when you want to go deeper. Curated papers, posts, and talks beyond what this track covers.
Beej's Guide to Network Programming
The definitive practical guide to BSD socket programming. Covers socket creation, bind, listen, accept, send, recv, and select/poll. After building TCP servers from scratch in this track, this guide fills in the production-grade details and corner cases.
Protocol Buffers Language Guide (proto3)
The authoritative reference for proto3 field types, field numbers, reserved fields, and compatibility rules. The field number reservation rules are the most important section for understanding safe schema evolution.
HTTP/2 Specification (RFC 7540)
The HTTP/2 RFC defines the binary framing layer, stream multiplexing, flow control, and header compression (HPACK) that gRPC is built on. Understanding the underlying protocol makes gRPC's behavior under load much easier to reason about.