Search
Lessons (38)
- How a Web Request Works
Follow one click from the browser to the server and back, through DNS, TCP, TLS, HTTP, load balancers β¦
- Services & Ingress
β¦ gone after restart" P1[pod] end subgraph With["β Through a Service"] C2[checkout] -- "http://shop-api" S{{"Service β¦
- Frontend Security
β¦ URLs <a href={user.website} Website</a // user.website = "javascript:steal()" // β Allow only http(s) const safeUrl = /^https β¦
- REST vs GraphQL vs gRPC
β¦ resources over HTTP http GET /users/42 GET /users/42/posts?limit=3 GET /users/42/followers/count β¦
- Observability: Logs, Metrics & Traces
β¦ prom-client"; const httpDuration = new client.Histogram({ name: "http request duration seconds", help: "HTTP request latency", labelNames: ["method β¦
- Backend Languages: Node.js, Go, Python & Rust
β¦ one thread + event loop"] EL(("π event loop")) -- IO1[DB call β wait in background] EL -- IO2[HTTP call β wait β¦
- Frontend Testing Strategy
β¦ 49.99 }]), ), http.post("/api/cart", () = new HttpResponse(null, { status: 201 })), ]; tsx it("lists products from the API β¦
- REST API Design
β¦ nouns in the URL, verbs in the HTTP method](/img/backend/rest-resources.svg) Rule 1: URLs are β¦
- Clean Architecture in Depth
β¦ translate between the world and the core ts // src/adapters/http/placeOrderController.ts β HTTP β use case β HTTP export β¦
- API Gateway, BFF & Service Discovery
β¦ you call http://orders-svc , and the platform routes to a healthy pod. (See Kubernetes β Services & Ingress .) Service β¦
- Hexagonal Architecture (Ports & Adapters)
β¦ the ways in ts // adapters/driving/http.ts β REST export function loanRoutes(app: Express, borrowing: ForBorrowingBooks) { app.post β¦
- Microkernel (Plugin) Architecture
β¦ MarkdownPlugin = { name: "external-links", version: "1.2.0", afterRender: (html) = html.replace(/<a href="http/g, '<a target β¦
- Authentication, Authorization & API Security
β¦ Set-Cookie sid=abc (HttpOnly, Secure, SameSite=Lax) B- S: GET /orders (Cookie: sid=abc) S- R: who β¦
- Frontend Performance & Core Web Vitals
β¦ Guessing leads to useMemo everywhere and no real gain. Caching and network - HTTP caching: Cache-Control: public, max β¦
- Clean Architecture
β¦ saved UC-- Ctrl: { id } Ctrl-- HTTP: 201 Created Notice: RegisterUser calls UserRepository , which is an interface . It has β¦
- Proxies, APIs and Real-Time Protocols
β¦ point Trade-off --- --- --- Public resource API REST over HTTPS Familiar and cache-friendly Internal typed call gRPC/RPC β¦
- Networking, DNS and Traffic Routing
β¦ A layer-4 balancer routes connections; a layer-7 proxy understands HTTP and can route by host/path β¦
- Scaling & Health Probes
β¦ httpGet: { path: /health/live, port: 3000 } periodSeconds: 10 failureThreshold: 3 restart after ~30s of failures readinessProbe: httpGet: { path β¦
- React vs Vue vs Angular
β¦ everything built in (router, forms, HTTP, DI, testing), with strong conventions. Great for large enterprise teams. ![React, Vue β¦
- Why Kubernetes?
β¦ mermaid flowchart TB U[π₯ Users] -- ING["πͺ Ingress<br/ HTTP routing"] ING -- SVC["π Service<br/ stable address + load balancing β¦
- Serverless Architecture
β¦ create an order from an HTTP request import { DynamoDBClient } from "@aws-sdk/client-dynamodb"; import { DynamoDBDocumentClient, PutCommand } from β¦
- Scaling, Load Balancing & Rate Limiting
β¦ Very fast, doesn't read HTTP. - L7 (application): reads HTTP, so it can route /api/ to API servers β¦
- Comments & Formatting
β¦ Clarify a regex or formula // Luhn checksum, see https://β¦ js / Converts an amount between currencies using the daily β¦
- Clean Error Handling
β¦ Throw specific errors, and let one middleware turn them into HTTP responses. js // routes just throw app.get β¦
- How Browsers Render a Page
β¦ script src="/app.js" defer </script <script src="https://analytics.example.com/a.js" async </script Reflow and β¦
- Monolith vs Microservices
β¦ charge] end subgraph OverNetwork["Microservices"] A2[Orders svc] -- "HTTP call<br/ ~5-50 ms, can time out,<br β¦
- Deployments, ReplicaSets & Rollouts
β¦ cpu: 250m, memory: 256Mi } limits: { memory: 512Mi } readinessProbe: httpGet: { path: /health/ready, port: 3000 } Labels and selectors: how β¦
- Pods
β¦ kubectl port-forward pod/hello 8080:80 open http://localhost:8080 kubectl delete pod hello β οΈ You rarely create β¦
- Service Communication: Sync vs Async
β¦ request/response One service calls another (HTTP/REST or gRPC) and waits for the answer. mermaid sequenceDiagram participant β¦
- Layered (N-Tier) Architecture
β¦ No SQL in controllers; no HTTP in services. 2. Dependencies point down: a layer may use the layer β¦
- Docker & Containers
β¦ USER node EXPOSE 3000 HEALTHCHECK CMD wget -qO- http://localhost:3000/health exit 1 CMD ["node", "dist/server β¦
- ConfigMaps, Secrets & Storage
β¦ LOG LEVEL: "info" FEATURE NEW CHECKOUT: "true" PAYMENTS URL: "http://payments-api" app-settings.json: { "currency": "EUR", "pageSize β¦
- TypeScript Essentials
β¦ Promise<T { const response = await fetch(url); if (!response.ok) throw new Error( HTTP ${response.status} ); return response β¦
- Onion Architecture & Clean vs Hexagonal vs Onion
β¦ ports (Clean use cases, Hexagonal ports) βββ adapters/ driving: http, cli Β· driven: postgres, stripe (Hexagonal adapters) How these relate β¦
- Database Indexing & Transactions
β¦ retry the transaction Transaction tips - Keep transactions short. Never wait for an HTTP call or user input inside β¦
- Resilience Patterns
β¦ Without one, a hung dependency holds your threads, connections and memory hostage. js const response = await fetch("http β¦
- Helm, kubectl Cheat Sheet & Best Practices
β¦ Using existing charts bash helm repo add bitnami https://charts.bitnami.com/bitnami helm install my-redis bitnami β¦
- Choosing an Architecture
β¦ Hexagonal + tactical DDD"] oa[HTTP adapter] -- oc((core)) -- ob[(Postgres adapter)] end subgraph Cat["π¦ Catalog: vertical slices (mostly β¦