IceFireDB-Redis-Proxy
#
A RESP proxy in front of Redis (single node or cluster) that replays commands to the other agents in
the mesh. Existing Redis applications get multi-site synchronisation without switching databases.
cd IceFireDB-Redis-Proxy
make # → bin/IceFireDB-Redis-Proxy
./bin/IceFireDB-Redis-Proxy -c ./config/config.yaml
redis-cli -p 16379 SET k v
What it is
#
| Property | Value |
|---|
| Protocol | Redis RESP on both sides |
| Backend | redisdb.type: node or cluster, redisdb.start_nodes |
| Replication | Commands propagated between agents over libp2p |
| Listener | proxy.local_port, default 16379 |
| Binary | bin/IceFireDB-Redis-Proxy (-c <config.yaml>) |
Configuration (config/config.yaml)
#
| Key | Meaning | Default in file |
|---|
proxy.local_port | RESP listener | 16379 |
proxy.enable_mtls | Mutual TLS for the proxy listener | false |
redisdb.type | node or cluster | node |
redisdb.start_nodes | Comma-separated backend addresses | 127.0.0.1:6379 |
redisdb.conn_timeout / conn_read_timeout / conn_write_timeout / conn_alive_timeout | Seconds | 5 / 1 / 1 / 60 |
redisdb.conn_pool_size | Backend connections (0 = short-lived) | 80 |
p2p.enable, service_discovery_id, service_command_topic, service_discover_mode, node_host_ip, node_host_port | Mesh settings | same shape as PubSub |
pprof_debug.enable / .port | pprof server | true / 16060 |
log.level | Log level | debug |
ip_white_list.enable / .list | Client allow-list | true / loopback |
cache.enable / .max_items_size / .default_expiration (ms) / .cleanup_interval (s) | Proxy cache | true / 2048 / 5000 / 120 |
ignore_cmd.enable / .cmd_list | Commands to drop | false / [] |
Operational notes
#
redisdb.start_nodes must point at a reachable backend before clients connect; the proxy is not a
database and has no storage of its own.- Commands are replayed on peers: non-deterministic ones (
SPOP, INCRBYFLOAT, anything using server
time, EVAL with math.random) will diverge across sites. Prefer deterministic operations, or keep
those keys in one site. - The cache in front of the backend defaults to enabled with a 5 s expiration — read-after-write from a
different client can be stale for up to that window. Disable
cache.enable when you need strict reads. pprof_debug is on in the sample config (16060); disable it outside development.- Same discovery-id caveat as PubSub: two deployments with the same id share a mesh.
Proxy or engine?
#
| Need | Use |
|---|
| Keep existing Redis, add multi-site sync | IceFireDB-Redis-Proxy |
| Replace Redis with a Raft-replicated engine and pluggable storage | NoSQL engine |
| Only message fan-out | IceFireDB-PubSub |