Grokking Redis
0% completed
8.6 Design a Chat System
Chat traffic comes in two kinds with opposite requirements. A message must arrive exactly as sent and in order, even if the recipient is offline for days. A typing indicator or an "online" dot is out of date within seconds, so losing one costs nothing.
Most design mistakes come from using one mechanism for both kinds. The clean design separates a durable path for messages, built on a database and Redis Streams, from an ephemeral path for presence and typing, built on Pub/Sub and keys with a TTL. Redis plays a different role on each path. This lesson follows one conversation, `c42
.....
.....
.....
Like the course? Get enrolled and start learning!
Reading Progress
0%