Part 4 · 1 chapters · ~8 min
Caches and Queues as Standard Equipment
Redis, Memcached, RabbitMQ, SQS, Kafka and NATS: what each is for, what each is paired with, and the signals that tell you it is time to add one.
6
Which one, and when
| signal | add |
|---|---|
| the same expensive read happens thousands of times a minute | Redis or Memcached as a cache |
| requests do slow work (email, PDF, webhooks) before responding | a job queue: Redis-backed (BullMQ, Sidekiq, Celery) or RabbitMQ / SQS |
| several services need to react to the same business event | a pub/sub or log: SNS+SQS, Kafka, NATS |
| you need replay, audit or rebuilding read models | Kafka (retained log) |
| rate limits, sessions, distributed locks | Redis |
CACHES AND QUEUES AS STANDARD EQUIPMENT
the shared infrastructure most services lean on
swipe the figure sideways, or tap expand for full screen
1/6
Redis
Redis is the Swiss army knife: one deployment often serves caching, sessions, rate limiting and job queues (BullMQ, Sidekiq). Split those uses into separate instances as load grows, because eviction policies differ.
cache, sessions, limits, queues in oneseparate instances per use as you grow