When should I use Redis in my application?
posée 2 months ago602 vuesen
Every architecture diagram has Redis in it. My app is a normal CRUD app with Postgres. Do I need it?
Diagnostic IA
Généré par IA. Ce n'est pas une réponse — la communauté ci-dessous le confirme ou le corrige. Vérifiez toujours avant de vous y fier.
1 réponse
Not by default. Postgres alone handles a lot, and every extra service is something more to run, secure and monitor. Add Redis when you have a concrete need:
1. Caching expensive computed results (leaderboards, aggregated stats) with a TTL. 2. Rate limiting and counters shared across multiple app instances. 3. Job queues (BullMQ, Sidekiq, RQ) for emails, image processing and webhooks. 4. Sessions or ephemeral state across instances. 5. Pub/Sub for real-time fan-out (chat, notifications) across servers.
Before adding it, check whether Postgres can do it well enough at your scale: UNLOGGED tables for caches, SKIP LOCKED queues (pg-boss, Graphile Worker), LISTEN/NOTIFY for pub/sub. Many products go a long way on Postgres only.
Connectez-vous pour dire si ça a marché.
Sign in and verify your email to post an answer.