Capacity Planning¶
The expected number of reconnections per day is about 10, which is about 1 per 10,000 seconds per connected device.
Given Prosody performance statistics, we can expect to handle about 26 reconnections per second on one CPU. This was measured on a laptop CPU, and performance on a server should be significantly higher. This means that we should be able to handle at least 260K devices per CPU.
Memory presents another scaling limit at 35KB/connection, which works out to 457K simultaneous connections in 16GB RAM.
At Digital Ocean, 16GB of RAM costs $160/month. That means that handling 10M users costs ~$3360/mo.
Using more than 1 CPU would require clustering support, which is forthcoming in Prosody.