01 · The challenge
A fund manager needed every trade on a master account mirrored instantly across many client accounts on different brokers - where even a few seconds of delay changes the result of a trade.
02 · What I built
A real-time engine that maintains a live connection to the master account and, the moment it places, modifies or closes a position, replicates that action across every connected follower account in parallel - with automatic per-follower position sizing.
03 · The hard part
Guaranteeing each follower trade fires exactly once. Broker feeds sometimes redeliver the same event, which would duplicate real orders. I used an atomic distributed lock with a double-checked read inside it, plus retry-with-reconnect logic so a broker dropping mid-operation never leaves accounts out of sync.
04 · The outcome
End-to-end replication latency under three seconds across all followers. Tolerates broker disconnections and duplicate events without manual intervention. Handles many follower accounts per master concurrently.
05 · Stack