Skip to main content

PostgreSQL in depth + Redis · Kafka

Ten steps to a real data platform — indexes, caching, event streams.

Difficulty
Advanced
Lessons
10

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

From read performance to write recovery

Measure

Locate bottlenecks with EXPLAIN and define pool boundaries.

Search and cache

Place pgvector and layered caches according to role and invalidation policy.

Write durability

Decide whether messaging is justified and design an idempotent pipeline.

Recovery and delivery

Connect backup, restore, topics, and push failures through operational contracts.

The first half (1–5) targets read performance — indexes, pools, caches. The second half (6–10) targets write durability — messages, idempotency, recovery.

Steps

  1. PostgreSQL deep dive — EXPLAIN · indexes — seq scan vs index · statistics
  2. Orchestrating multiple pools — domain split · query helpers · transactions
  3. pgvector + HNSW — vector type · operators · indexes · reproducibility
  4. Five roles of Redis — cache · session · rate limit · pub/sub · distributed lock
  5. 3-layer cache strategy — stale-while-revalidate · invalidation · TTL
  6. Kafka — when · when not — event signatures · partitions · backpressure
  7. Data pipelines — retries · idempotency — the myth of exactly-once · outbox
  8. Backup · restore drills — pg_dump · PITR · monthly rehearsal
  9. Kafka topic design — naming · partitions · Producer/Consumer · DLQ
  10. Implementing push notifications — Firebase · token storage · failure codes · multi-device

Prerequisites — complete backend-with-spring or python-data-pipeline · basic PostgreSQL CRUD.

Lessons

  1. 1

    PostgreSQL deep dive — EXPLAIN · indexes

  2. 2

    Multi-pool orchestration

  3. 3

    pgvector + HNSW

  4. 4

    The five roles of Redis

  5. 5

    3-layer cache strategy

  6. 6

    Kafka — when · when not

  7. 7

    Data pipelines — retries · idempotency

  8. 8

    Backup · restore drills

  9. 9

    Step 9 — Kafka Topic Design

  10. 10

    Step 10 — Implementing Push Notifications

Other courses

All courses →