So I’m starting a project that will connect about 1 million devices, with the possibility to increase it even more. Each device will have its own topic and each device should receive about one message per day.
In order to have so many connections, I know that I have to adjust parameters such as max_connections and OS limits for open files.
For machines, I’m considering something like multiple t3.2xlarge (8 CPU, 32 GB) in a cluster.
How many connections each machine would be able to handle?
Should I choose bigger machines?
I appreciate any input.
Edit:
Each device has one connection and should keep connected, unless some kind of failure occurs
If a massive failure occurs, it is possible that all devices try to connect “at the same time”, but I think a randomized exponential backoff for the devices + load balancer limits should solve it
Let me give a quick generic comment:
You should not choose bigger machines but rather test medium ones (like the t3.2xlarge you mention) while making it possible or even easy to go for bigger ones if needed later.
I’d go with the 8vCPU/32GB and test them for 250k connections each. Be aware of possible rate/config limits of your cloud provider, by the way.
You’ll have to configure VerneMQ specifics, BEAM settings, and OS settings. The VerneMQ documentation should give you the basics for that.
For a use case like this, you also want to secure VerneMQ commercial support so we can help you more efficiently! Contact me for details at any time.