Skip to content

Performance

Sebastian Raff edited this page Sep 30, 2017 · 26 revisions

I'm not a database expert nor do I think that mqttDB as of today is good at scaling. mqttDB handles memory quite inefficient, the whole database is kept in memory in the core and all the worker processes.

Due to the fact that mqttDB just uses retained MQTT messages to publish all documents and views, you have to be aware that this might - depending on the amount/size of documents/views and the subscription count - put significant load on your MQTT broker and raise it's memory consumption.

mqttDB wasn't designed for storing gigabytes of data or millions of documents, The concept was made with a couple of dozen views and a few thousand rarely changing documents in mind. You should find out for yourself if it can deliver sufficient performance for your use case.

Furthermore you should take care that your database clients only subscribe the topics they really need, it should be well considered if it's really needed to subscribe to db/doc/#. A better approach could possibly be to create a view that contains the ids of needed documents, let the client first subscribe to that view and then subscribe only to these documents.

Clone this wiki locally