On 24 November, between 15:15 and 16:24 UTC, our Signal service was unstable. Signal is what peers use to set up connections with each other, so during this time peers may have been slow or unable to establish new connections. Existing peer connections were not disrupted, and the service was partly available throughout.
Our hosting provider had a network outage in the data centre where Signal runs. The outage cut most of our Signal servers off from an internal messaging system that they use to pass messages between each other.
The servers did not handle that well. Instead of waiting for the connection to come back, they kept accepting work they could not complete, ran out of memory and restarted. After restarting, they could not reach the messaging system and stopped again. This repeated until the connections held, at about 16:24 UTC.
A network problem at a provider is something we should ride out. Here, a disruption of a few minutes on our side turned into more than an hour of instability because of the way our own service reacted to it. That part was ours to fix.
We reproduced the failure in a test environment and have made the following changes:
Losing the connection no longer exhausts memory. Signal now detects a stalled connection within seconds, reconnects, and keeps serving the peers it can.
Signal waits and retries at startup if the messaging system is not reachable, instead of stopping.
Each Signal server can now use any of the messaging servers, not just one.
We are also working on limiting how quickly peers reconnect after a disruption, so that a recovery cannot overload the service, and on making our load balancers better at recognising a Signal server that is struggling. And we are working with our hosting provider to limit the impact of similar outages in future.