{} The Go Reference

Go is a server language

Networking & Web, in Go

Go was built for the network — fast servers, a clean net/http, and concurrency that makes tens of thousands of connections feel ordinary. From raw TCP and UDP up through HTTP, REST, gRPC and WebSockets, then the databases and project structure behind a real service — built the Go way and runnable in place.

Your networking progress

Mark a topic “learned” on its page and watch the bars fill.

Skill map

Learned nodes light up — the glowing one is your next step. Click any node to jump in.

Sockets & the net Package

The wire underneath everything — TCP and UDP with the net package, the Conn interface, and resolving names and addresses.

HTTP

The web in net/http — writing servers and handlers, making client requests, routing and middleware, and serving over TLS.

APIs & Messaging

How services talk — JSON REST APIs, gRPC and protobuf, WebSockets for live connections, and Go’s own RPC and serialization.

8 · Intermediate Building REST APIs

JSON over HTTP done right — resources and methods, idempotency, decoding/validating requests and encoding responses, the status codes that matter, consistent error envelopes, and versioning.

✦ Complete · ⏱ 4 min
9 · Advanced gRPC

Typed, fast service-to-service calls — Protocol Buffers, the four RPC kinds, code generation with protoc, and HTTP/2 streaming over plain REST.

✦ Complete · ⏱ 6 min
10 · Intermediate WebSockets

Full-duplex, persistent connections over one TCP socket — the HTTP Upgrade handshake, frames, ping/pong keepalives, and when to choose them over SSE or polling.

✦ Complete · ⏱ 6 min
11 · Intermediate Server-Sent Events

One-way push over plain HTTP — the text/event-stream format, flushing events, auto-reconnect with Last-Event-ID, and when SSE beats WebSockets.

✦ Complete · ⏱ 5 min
12 · Beginner Polling

When the client just asks again — short polling on a timer vs long polling that holds the request open, their costs, and when polling is the right boring choice.

✦ Complete · ⏱ 4 min
13 · Intermediate Webhooks

The other side of polling — an external service POSTs to your endpoint when something happens. How to receive one safely: verify the signature, ack fast, dedupe for idempotency, and process out of band.

✦ Complete · ⏱ 7 min
14 · Intermediate RPC & Serialization

Calling Go functions across a wire — net/rpc and JSON-RPC, plus the serialization choices underneath: gob vs JSON vs protobuf and their trade-offs.

✦ Complete · ⏱ 6 min

Databases & Backend

Persisting and structuring a service — database/sql, transactions, Postgres and Redis, project layout, and graceful shutdown.

🐹 A goroutine per connection

Go's networking model is disarmingly simple: accept a connection, hand it to a goroutine, repeat. No callback hell, no event loop to reason about — just straight-line code that scales because goroutines are cheap. The runnable examples here run in-process (no real network) so they're safe to execute anywhere; the concurrency track explains the machinery beneath.