PostgreSQL in depth + Redis · Kafka
Ten steps to a real data platform — indexes, caching, event streams.
- Difficulty
- advanced
- Lessons
- 10
PostgreSQL in depth + Redis · Kafka
SELECT and INSERT are easy. At production traffic, most bottlenecks live in indexes · caches · asynchronous queues. This course frames the roles and boundaries of PostgreSQL, Redis, and Kafka.
Who it's for
- Devs who want to answer "why is this query slow?"
- People unsure whether to use Redis for caching, sessions, or locking
- Teams debating whether Kafka is warranted
What you can do afterwards
- Read EXPLAIN and tune indexes
- Run multiple PostgreSQL pools from one app
- Use Redis in its five roles (cache · session · rate limit · pub/sub · distributed lock)
- Vector search with pgvector + HNSW
- Design Kafka topics · consumers · backpressure
- Choose the right tier in a 3-layer cache (edge · Redis · PG)
- Send push notifications — token storage · failure-code handling · multi-device
Flow
[1] EXPLAIN ──▶ [2] Multi-pool ──▶ [3] pgvector ──▶ [4] Redis 5 roles ──▶ [5] 3-layer cache
│
▼
[10] Push ◀── [9] Kafka topics ◀── [8] Backup·restore ◀── [7] Idempotent pipeline ◀── [6] Kafka decision
The first half (1–5) targets read performance — indexes, pools, caches. The second half (6–10) targets write durability — messages, idempotency, recovery.
Steps
- PostgreSQL deep dive — EXPLAIN · indexes — seq scan vs index · statistics
- Orchestrating multiple pools — domain split · query helpers · transactions
- pgvector + HNSW — vector type · operators · indexes · reproducibility
- Five roles of Redis — cache · session · rate limit · pub/sub · distributed lock
- 3-layer cache strategy — stale-while-revalidate · invalidation · TTL
- Kafka — when · when not — event signatures · partitions · backpressure
- Data pipelines — retries · idempotency — the myth of exactly-once · outbox
- Backup · restore drills — pg_dump · PITR · monthly rehearsal
- Kafka topic design — naming · partitions · Producer/Consumer · DLQ
- Implementing push notifications — Firebase · token storage · failure codes · multi-device
Prerequisites — complete backend-with-spring or python-data-pipeline · basic PostgreSQL CRUD.
Lessons
Other courses
All courses →- Getting Started with a Dev Environment
- From HTML/CSS/JS to React, Next.js, Tailwind
- Build Your First Fullstack App with Next.js 16
- Backend with Spring Boot 4
- Python · FastAPI · Data Pipelines
- AI-native developer tooling — Claude Code · MCP · design tools
- Docker · Caddy · Cloud — 10 deploy options
- Central admin platform — many domains behind one hub
- Local LLM · pgvector · building a RAG chatbot
- Tauri 2 — desktop · mobile in one codebase
- Testing strategy and quality gates
- Web security foundations — JWT · OAuth · OWASP
- Building public-data crawlers
- Monorepo · SSOT · layer separation thinking