Red Courier is an open-source Go application that syncs data from Postgres into Redis on a schedule. It’s built for high-performance environments where you want to populate Redis hashes, streams, or sorted sets from a relational source like Postgres — useful for caching, real-time analytics, or data fan-out systems.
In this article, we’ll walk through the motivation, architecture, and features of Red Courier — and show you how to use it with just a few lines of configuration.
In many applications — particularly in e-commerce, finance, or high-throughput APIs — Redis is used as a real-time cache or system of engagement, while Postgres (or another RDBMS) remains the source of truth.
The common challenge is:
How do you keep Redis updated with new rows or changes in Postgres, without replicating the entire database or writing brittle glue code?
Red Courier solves this by letting you declaratively configure sync tasks:
We open sourced Red Courier for all to enjoy — and we welcome contributions, feature ideas, and improvements from the community.
Sync Postgres data into Redis structures:
map → Redis hash (HSET)list → Redis list (LPUSH)set → Redis set (SADD)sorted_set → Redis sorted set (ZADD)stream → Redis stream (XADD)Configurable per-task scheduling
Per-task aliases for Redis keys
Column mapping from logical to physical DB names
Tracking support: Fetch only new/updated rows using a checkpoint value.
Let’s say you have a table orders in Postgres and you want to publish new orders into a Redis stream every 15 seconds. You can configure Red Courier like this:
Red Courier will:
orderscreated_at value from those rowscheckpoint:order_streamcreated_at > <last checkpoint>Tracking supports both > and < comparisons and uses Redis to persist the last-seen value.
Tracking is optional but powerful. If you enable it with:
Then Red Courier:
checkpoint:ordersWHERE updated_at > $1 clause in the queryThis lets you run efficient delta syncs for fast-growing tables.
Red Courier reads from a single YAML file that configures:
You can see a full example in the README.
Red Courier can be compiled from source, run as a binary, or containerized:
Or via Docker:
Check out the repo:
👉 github.com/Checker-Finance/red-courier
And see the LLM-oriented configuration guide to help generate valid YAML quickly using structured prompts.
Whether you’re building an order feed, caching product data, or syncing financial transactions, Red Courier gives you a clean way to keep Redis in sync with Postgres — efficiently and on your terms.