IceFireDB-PubSub #
Redis PubSub protocol over a libp2p network: clients keep using SUBSCRIBE/PUBLISH, and the
messages travel between nodes across NATs and regions instead of staying inside one Redis instance.
cd IceFireDB-PubSub
make # → bin/IceFireDB-PubSub
./bin/IceFireDB-PubSub -c ./config/config.yaml
redis-cli -p 16379 SUBSCRIBE name # terminal 1
redis-cli -p 16379 PUBLISH name hello # terminal 2 (any node in the mesh)
What it is #
| Property | Value |
|---|---|
| Protocol | Redis RESP — SUBSCRIBE, UNSUBSCRIBE, PSUBSCRIBE, PUBLISH |
| Transport between nodes | libp2p pubsub (Kademlia DHT + IPFS-network discovery) |
| Local listener | proxy.local_port, default 16379 |
| Binary | bin/IceFireDB-PubSub (-c <config.yaml>) |
| State | No persistence: this is a message bus, not a database |
Configuration (config/config.yaml)
#
| Key | Meaning | Default in file |
|---|---|---|
proxy.local_port | RESP listener | 16379 |
proxy.enable_mtls | Mutual TLS between proxies | false |
p2p.enable | Turn the libp2p mesh on | true |
p2p.service_discovery_id | Rendezvous name — must match across peers | p2p_redis_proxy_service_test |
p2p.service_command_topic | Command channel inside the mesh | p2p_redis_proxy_service_topic_test |
p2p.service_discover_mode | advertise or announce | advertise |
p2p.node_host_ip / node_host_port | Address peers should use (0 = any port) | 127.0.0.1 / 0 |
pprof_debug.enable / .port | /debug/pprof server | true / 16060 |
log.level | debug, info, warn, error | debug |
ip_white_list.enable / .list | Client IP allow-list | true / loopback entries |
cache.enable / .max_items_size / .default_expiration (ms) / .cleanup_interval (s) | Message cache | true / 2048 / 5000 / 120 |
ignore_cmd.enable / .cmd_list | Drop selected commands | false / [] |
Notes that bite in real deployments:
- The discovery id and command topic are the network identity. Copying the config from the sample without changing them puts your cluster in the same mesh as anyone else who did the same.
pprof_debugis enabled and listens on16060in the sample config. Turn it off, or bind it to loopback and firewall it.- The IP allow-list is enabled by default with
127.0.0.1, so a remote client is refused until you add its address.
What it does not do #
- No message persistence, no replay, no consumer groups, no streams.
- No cross-mesh bridge: two different
service_discovery_ids are two separate worlds. - Not part of the NoSQL engine’s command surface — the engine has no
SUBSCRIBEat all.
Where it fits #
Use it when web2 clients already publish through Redis and you want the bus to span sites without rewriting them. Pair it with a real queue if you need delivery guarantees; PubSub is best-effort by design.