Where Redis sits in the stack
Redis is an in-memory data store, most often used as a cache and a queue broker. In Endora Commerce it is not an optional extra: together with PostgreSQL and Meilisearch it is one of the three services whose reachability the platform’s health endpoint checks. If any of them does not respond, the endpoint returns 503.
The division of responsibility is simple. The catalog, orders, prices and sessions have their system of record in PostgreSQL. Redis holds what can be rebuilt or is short-lived by nature.
What the platform keeps in it
- Job queues built on BullMQ - more on those below.
- Read caches: settings, sales channels, CMS pages, the blog, the mega menu, dictionaries and cart recalculations.
- Sessions: the session row is stored in PostgreSQL, and Redis acts as a fast read layer so the database is not queried on every request.
- Short-lived login state: second-factor (MFA) challenges and OAuth transactions, with a time to live set so that an abandoned login simply expires.
- Locks: among others, the lock that serializes installing, enabling and disabling modules, and a lock used when orders are taken in through the API.
An administrator sees one part of this directly: the “Clear cache” page in the admin panel, where selected areas or everything can be cleared so that freshly published content and changed settings show up immediately.
Queues: what runs in the background
There is one rule: the code handling a request only enqueues the job and responds, and a separate consumer executes it. Every job is claimed atomically, so two worker processes running in parallel never process it twice.
| Queue | What it does | What shows in the admin panel |
|---|---|---|
| Webhook delivery | Signs the event (HMAC-SHA-256) and sends it to the subscriber URL; up to 8 attempts with exponential backoff | The deliveries list under webhooks; a delivery that failed for good can be replayed manually |
| Transactional emails | Sending the messages triggered by events in the store, such as an order confirmation or a shipment notification | - |
| Catalog bulk operations | Bulk edits of more than 50 products, and a full Meilisearch reindex after an attribute’s searchable flag changes | The “Bulk actions” page with status and counters; an in-app notification and an email on completion |
| Product feeds | Generating and delivering files, including for Google Merchant Center | - |
| Newsletter | Campaign planning and sending with one job per recipient, automation steps | - |
| Server-side analytics events | Delivering server-side events to Google Analytics 4 and GTM | - |
Invoice submissions to KSeF take the same route: a durable queue with retries. The practical effect is that a KSeF outage or a slow webhook receiver on the integrator’s side does not stall order intake: the job waits in the queue and retries with increasing delay until it succeeds or a person steps in.
Requirements and configuration
- Redis 7.x. The platform connects through a single address in the
REDIS_URLvariable, so it can be Redis from a container, from distribution packages or on a separate server. - In the reference production Compose file, Redis runs on the same VPS as everything else, on the stack’s private network, with no published port.
- The same file starts it with the append-only file enabled (
appendonly yes), so that jobs waiting in a queue survive a restart. According to the Redis persistence documentation, with the default policy of syncing to disk every second you can lose about one second of writes in a failure. - If you set a memory limit (
maxmemory), keep thenoevictionpolicy. BullMQ requires it to work correctly, because evicting an arbitrary queue key corrupts the queue’s state. Eviction policies such asallkeys-lrumake sense for a pure cache, not for an instance that queues live on.
Scaling the workers
By default, queue consumers run in the same process as the API, which is enough on a single VPS. Once bulk edits, imports or reindexing start to compete with response times, the BACKEND_ROLE variable splits the process roles: api serves HTTP only, worker handles queues only. Several worker processes can be started with no configuration change, provided they all point at the same Redis and the same database.
What happens if Redis goes away
Losing the contents of Redis does not delete any business record. The cache is rebuilt on subsequent reads, and sessions are read back from PostgreSQL. What can suffer is the jobs that happened to be waiting in a queue, which is why it is worth leaving AOF enabled. Bulk operations have an extra safeguard: their state is stored in the database, and at startup the worker re-enqueues those left in the pending state.
When troubleshooting, two symptoms come up most often. An operation that never leaves the pending state usually means there is no running worker, or its REDIS_URL differs from the API’s. Jobs piling up while consumers sit idle usually point to a disabled module: its consumers stay paused until the module is enabled again.