DROP ALERT NOTES
Run live and prematch alerts as separate services
One account can hold a live and a prematch connection side by side. Run them as separate services with separate thresholds, logs and restarts.
The account allows one connection per stream, and the live and prematch streams can run side by side, as the SSE setup guide documents, checked 2026-10-09. That allowance is also an instruction: the two streams are different products with different rhythms, and they belong in separate services, not in two threads of one process.
Why one process is the wrong unit
The live vs prematch page lays out the difference: live drops move every few seconds in play, prematch drops drift over hours. Two rhythms in one process means two thresholds, two cooldown clocks and two log streams competing in one address space, and a crash in one takes the other down with it.
A deploy of a prematch rule change should never bounce your live feed on a Saturday evening. Separate services make that sentence true by construction.
What separation actually means
Two services, each small. Each holds its own stream connection, its own threshold rule, its own dedupe store and its own log file. Each restarts on its own schedule, reconnects on its own backoff, and pages you on its own heartbeat. The dedupe windows differ too: the dedupe guide notes that cooldowns belong per phase first, because live and prematch differ far more than any two sports do.
Shared code, separate state. The parsing library and the message formatter can be the same package; everything that remembers must not be shared.
The failure domain is the prize
The payoff is not elegance; it is blast radius. A live service that wedges during a final costs you live alerts and nothing else: prematch keeps running. A bad prematch deploy costs you a quiet window and nothing else. Each service's uptime, threshold and noise floor can be tuned for its own rhythm without a committee of if-statements.
It also makes each service honest to read. A log that contains only live alerts during a match tells a clean story; a mixed log tells you two stories at once and answers neither.
When one process is fine
For a weekend project or a first relay, one process with two connections is fine. The split matters when the alerts matter: when someone acts on them, when a quiet hour would hide a broken feed, when a deploy can not wait for the match to end. That is the moment the second service earns its existence.
Two streams, two services, two heartbeats. The account allows the pair; your process layout should honor it.