Scaling with SwarmSenseΒΆ

In the real world there will be hundreds of thousands of sensors sending data every minute. As the number of sensors increases, the application should be capable to server these large number of sensors. Scaling with SwarmSense is really easy. The key components of SwarmSense are RabbitMQ, PostgreSQL, InfluxDB and Nginx. Each of these are highly scalable.

For now all of these components are installed on a single node. But if you have millions of sensors then you have to scale the setup to server each sensor properly. In this case you can setup separate node for each of these services according to your uses.


For REST API load balancing you can use existing load balancing solution like nginx load balancer. Now run multiple instance of REST application. Nginx will route the incoming requests to these application instances according to load. With this your application will be able to server millions of sensor and clients.

RabbitMQ is being used for MQTT, MQTT over web and message queue and its highly scalable.

For PostgreSQL and InfluxDB you can use single node.

For background task we are using Celery distributed task queue. You can add more workers if load increases.