What is the best practice to scale the server resources based on number of users increase

Dear team
Since i am testing with less devices as 2-3 and i am planning to test with multiple devices as more than (500-1000) with multiple users.
Can anyone suggest me what would be resource requirements (cpu ,RAM, and Disk).

Any help would be much appreciated!!!


The number of users is irrelevant and the rest more depends on the number of items, ‘cleverness’ of rules and general architecture (how much autonomous preprocessing is done in the devices themselves and how much still needs to be done on the server …)

The smallest possible commonly used computer (a current Raspberry) can already handle 1000 items well.
If you want to be on the safe side get a x86 PC with 4+ GB of RAM.

That is correct for the core framework. But if every of those users open Paper UI, which is ridiculously dump in how it uses the REST interface by most of the time just downloading everything, the REST interface and core will be under heavy stress and probably fail.

What could help is a cache proxy in front of openHABs REST, because AFAIK the web interface of openHAB supports ETags.

I would recommend configuring in such a way that you can grow. I would plan on hosting your persistence datastore on a separate machine from your OH server unless latency is a concern (in which case OH may not be the best choice in the first place). I would probably start something like Markus recommends at the end of his posting.

I will second that number of Items/Devices isn’t really going to be your problem with scaling. Your Rules, and UIs are going to dwarf them in how they impact the system.

Disk space needs will completely depend on what you save and how often. You will have vastly different disk storage requirements if you save every value to 3000 Items (NOTE you will need more Items than you have devices and 3 to 1 is about what I have in my setup) every second compared to saving 100 Items every time they change.

Sure, that might lead to disaster so good you point it out.
OTOH I wouldn’t expect many admin users to be active at the same time and for much longer than the initial setup phase plus eventually some expansion steps. If that really was the plan that would’ve been a strange use case and the OP should have pointed that out.
Do you know if that also applies to multiple habdroid users ? That’s REST interface usage is not as-dumb, or is it ?

No. habmin is requesting the state once and then works with the changes only.

I meant the Android app