Tier 4 — Web & Backend

12 lesson xây dịch vụ backend Go từ HTTP raw đến gRPC, GraphQL, auth, TLS, graceful shutdown.

Tier này dạy gì?

Tier 4 đi sâu vào backend development: net/http stdlib, REST API design, framework (chi/gin/echo), validation, JWT authentication, TLS/crypto, WebSocket, gRPC, GraphQL, graceful shutdown, rate limiting + circuit breaker. Kết thúc với mini-project REST API đầy đủ: auth + CRUD + middleware + tests.

Tiền đề: đã xong Tier 3 (concurrency patterns, error handling, context).

12 lesson trong Tier 4
Lesson 42
http.Handler/HandlerFunc, ServeMux, middleware chain, request/response lifecycle.
Lesson 43
Resource modeling, HTTP method/status code, versioning, idempotency, pagination, HATEOAS.
Lesson 44
chi/gin/echo so sánh, khi nào dùng framework, middleware pattern thực tế.
Lesson 45
Validator tag, struct validation, error response chuẩn (RFC 7807), i18n.
Lesson 46
Session vs JWT, signing algorithm, refresh token, OAuth2 flow, security pitfalls.
Lesson 47
TLS handshake, certificate, crypto/*, password hashing (bcrypt/argon2), HMAC, AES.
Lesson 48
WebSocket protocol, SSE (Server-Sent Events), long polling, khi nào dùng cái nào.
Lesson 49
.proto định nghĩa, code generation, unary/streaming RPC, interceptor, gRPC-Gateway.
Lesson 50
gqlgen, schema-first, resolver, N+1 problem (DataLoader), khi nào GraphQL > REST.
Lesson 51
signal.Notify, drain in-flight request, deadline shutdown, K8s preStop hook.
Lesson 52
Token bucket, leaky bucket, sliding window, hystrix pattern, Redis-based rate limiter.
Lesson 53
Build full REST API: auth JWT + CRUD + middleware (logger, auth, recover, rate-limit) + tests + Docker.