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 …