Search

Lessons (16)

  • Caching & Redis

    … 4200, value: "ana" }); await redis.zIncrBy("leaderboard", 50, "bo"); const top10 = await redis.zRangeWithScores("leaderboard", 0, 9, { REV …

  • Design a URL Shortener

    Generate durable short links, redirect in milliseconds, prevent abuse and keep analytics off the redirect path. A short …

  • Scaling, Load Balancing & Rate Limiting

    … Keep sessions in Redis or in tokens, files in object storage (S3), and state in the database. Scaling …

  • Helm, kubectl Cheat Sheet & Best Practices

    … redis bitnami/redis -f my-redis-values.yaml helm rollback my-redis 1 helm uninstall my-redis -n …

  • L — Liskov Substitution Principle

    … set(k, v) }; const redisStorage = { get: (k) = redis.get(k), set: (k, v) = redis.set(k, v) }; function …

  • Docker & Containers

    … postgres://app:secret@db:5432/shop REDIS URL: redis://cache:6379 depends on: db: { condition: service healthy } cache …

  • Authentication, Authorization & API Security

    … App- U: redirect to Google (+ PKCE challenge) U- G: log in + consent G- U: redirect back with ?code …

  • SQL vs NoSQL Databases

    … four families mermaid mindmap root((NoSQL)) Document MongoDB Firestore JSON documents Key-value Redis DynamoDB get / set by …

  • Flash Sale: 10 Million Buyers, No Oversell

    … A Redis Lua script can gate a hot key, but strict no-oversell still needs a durable owner …

  • Premiere-Night Video Streaming

    … Heartbeat progress to Redis for fast resume and persist asynchronously to durable storage. Include a timestamp/sequence so …

  • KISS: Keep It Simple, Stupid

    … Profile service] MS1 -- K[(Kafka)] -- MS2 MS3 -- R[(Redis)] end subgraph Simple["✅ 3 users, day one"] direction LR …

  • Hash Maps & Sets

    … bat -- K3["key 'abt'"] Real-world uses - Caches (Redis is essentially a giant networked hash map) - Database indexes …

  • How a Web Request Works

    … 200 OK, 201 Created, 204 No Content 3xx ↪️ Redirect 301 Moved Permanently, 304 Not Modified 4xx 🙋 Client made …

  • Message Queues & RabbitMQ

    … SNS Managed queue / pub-sub Serverless, no ops Redis Streams / BullMQ In-memory streams Lightweight background jobs in …

  • Observability: Logs, Metrics & Traces

    … new NodeSDK({ instrumentations: [getNodeAutoInstrumentations()] }).start(); // HTTP, Express, pg, redis, fetch… are now traced automatically SLIs, SLOs and error …

  • CQRS & Event Sourcing

    … joined, pre-computed Storage Postgres (transactions) Elasticsearch (search), Redis (fast lookups), a reporting DB Scaling Consistency matters Scale …