← Back to docs
Realtime wake-up

Making data react faster with Redis (optional)

External data your strategy reads arrives by **polling** by default. Adding Redis lets the agent wake the moment a new value lands and read it again right away. The values themselves always come from a database query — Redis only carries the "something new arrived" signal.

First: you may not need this — Without Redis your data is still correct. The only difference is latency. For daily or hourly indicators polling is plenty; you need this page only when a strategy has to react within seconds. A missed signal is picked up by the next poll.

1. Which setup is yours

The publisher (your collector) and the subscriber (your agent) must be able to reach the same Redis. Any arrangement that satisfies that works.

A

Everything on one machine — self-hosted (simplest, free)

If the collector and the agent live on the same server, installing Redis there is the whole job. Nothing crosses the network, so it is the fastest option and the address never leaves the machine. The default config already listens on 127.0.0.1 only, so it is not exposed even without a password.

sudo apt install -y redis-server
sudo systemctl enable --now redis-server
redis-cli ping        # PONG
Address to put in the slot:redis://127.0.0.1:6379
B

Several machines of your own — one host, private network

If collector and agent are on different servers, run Redis on one of them and let the others connect. Within the same cloud and region, connecting over the private IP is the safest choice. ★ Binding to 0.0.0.0 with no password gets found by internet scanners quickly. If you must go over the public network, use all three: a long password, a firewall rule, and TLS (rediss://).

# /etc/redis/redis.conf
bind 10.0.0.5 127.0.0.1      # ★ 0.0.0.0 금지
requirepass <긴-무작위-비밀번호>
# 방화벽: 내 서버 IP 만 6379 허용
Address to put in the slot:redis://:비밀번호@10.0.0.5:6379
C

The networks are separate — a managed free tier

When collector and agent sit somewhere that cannot reach each other (different clouds, home, office), put a managed Redis in between. Wake-ups store almost nothing, so free limits usually go a long way.

Address to put in the slot:rediss://…
Checked September 2026 — providers change their limits, so confirm at the link.
Upstash256MB · 월 50만 명령Starts without a card. Publishing once a minute is roughly 40–50k commands a month, well inside the limit. Note that the concurrent-connection limit is not published, and SUBSCRIBE works over the TCP (redis://) address, not the REST endpoint.
Aiven1GB · 단일 노드Runs Valkey, the Redis-compatible fork. Pub/sub is a core command, so wake-ups are unaffected.
Redis Cloud30MBThe size looks small, but wake-ups use no storage, so 30MB is irrelevant here.
D

Someone else publishes — teams and institutions sending directly

You do not have to use our collector. Any program can publish as long as it matches the channel name and payload shape. The channel is sori:data:v1: followed by the table name (schema stripped). The payload is only a cursor hint — even if you put values in it, they are not used; the woken side re-runs its own query.

PUBLISH sori:data:v1:fear_greed '{"v":1,"last":1757462400000,"n":1}'

2. Turning it on — three places must line up

If any one of them is missing it falls back to polling **without an error**. The values stay correct and only latency grows, which makes it easy to miss that it never turned on.

1

Publisher — tell the collector the address

The collector publishes after it inserts new rows. With no address it skips publishing and says so in the run result.

# ~/soritrading-fetchers/.env
SORI_WAKE_REDIS_URL=redis://127.0.0.1:6379
2

Subscriber — save the slot on the agent

Enter an alias and the address on the web, then press [Test connection] and that machine answers whether it actually connects. The address is stored only in that machine's keystore — it never reaches our servers and never appears in logs.

3

Declaration — which table listens on which slot

Lower on the same screen, under [Dataset declarations], switch the mode to redis and fill in the slot name and the table name. The table name is required because the channel name is derived from it.

mode: redis   ·   redisAlias: main   ·   tableName: fear_greed
Confirming it is on — The badge next to a declaration reading 'realtime · Redis(alias)' means it is on. If it says 'polling', the reason it is not on is printed right there.
Worth knowing
  • Redis is only a wake-up. Missing a message (an agent restart, say) does not corrupt anything — the next poll catches up.
  • You cannot subscribe over a serverless provider's REST endpoint. Use the TCP address that starts with redis:// or rediss://.
  • If a free tier drops idle connections you can quietly end up polling only. The agent detects the drop and reconnects, but frequent drops mean that tier is a poor fit for this.
  • Slot names and database aliases are separate namespaces. Both being 'main' still means two different servers.
  • The connection string is stored on the agent machine only. Our servers are not on this path and never receive the address, on save or on read.
  • Deleting a slot does not cut an open subscription immediately; it ends at the next reconnect. Until then the values are the same, just faster.