Hi Adam,
You need to have the DBs on one VM (or cloud system) and the application deployed on multiple VMs. Vertical scaling of each VM is an easy solution to reach support for several thousands of devices easily.
This work is highly dependent on the use case and requirements. There's no "one fit all" solution yet.
Containerized applications can be used too, the challenge there is to configure the management tunnels in a way that the containerized cluster can talk to the management tunnels, VMs are definitely easier to handle in this regard.
The following docs should clarify and reply to the rest of your questions, I highly recommend to read everything:
If you want to put less stress on the system I also advise to bring down the interval of openwisp-config to 5 or 10 minutes instead of 2 minutes, ensure you have SSH push and management tunnel configured correctly to ensure speedy updates.
Best regards
Federico CapoanoOpenWISP OÜ
Harjumaa, Tallinn, Sepapaja tn 6, 15551
VAT: EE101989729