There is much content about large scale.
Check out:
http://www.cs3community.org/
Especially the 2014, 2016 and 2017 (that i present a large scale design bases on docker/k8s).
Other sources are the nextcloud conferences, enterprise track.
This might be also of interest for you:
https://www.360ict.nl/blog/my-nextcloud-scalability-session-online/
Its a bit old, but the post contains a sheet which shows the large scale installations of owncloud. At the tine, nextcloud was just founded, but you can substitute owncloud for nextcloud concerning the design.
The basic setup is for a monolith large setup:
- n+1 webservers containing nextcloud php. Based on the load, anything fron 2-12.
- galera mysql database setup, mostly 4 server setup with one write and multiple reads with a loadbalnancer (maxscale was popular, check out https://severalnines.com/ for some excellent galera blogposts.
- some loadbalancers for the webservers. We use kemp, but haproxy still seems popular. But its a basic webserver loadbalancing.
- some storage. Glusterfs was the official recommendation from owncloud at the time, but now everyone haa moved awat fron that. Nfs is a decent startpoint, but i think a bottleneck in the long run (again, depends on the usage of your users). Now i’ve seen Ceph more and more being used. We too use the block storage from ceph for the databases and the object storage for files. If you have any ha storage available, you probably can use that natively.
What i’ve seen is shat this scales until about 10-20.000 concurrent users, depending on the load/usage (just using the webui is offcourse much different then users syncing on mutiple desktops and autosaving pics fron their mobiles). The limit seems to be at the database layer, beyond 20k users the databases are just overloaded.
After the 20k users, Nextcloud has global scale as a solution. Basicly a setup like before but scaled horizontally, so lots of monolith setups. Global scale offers a directory service as a entry point to route you to the correct site.
We ourselves scale based on small setups, docker container instances of nextcloud including the database, orchestrated with kubernetes. Our load tests show 1000 users per container based on smashbox. As we abstract storage from compute, we can scale as much as Ceph can handle. And with CERN having a 10k storage node setup, im confident we can scale enough. The downside of Ceph is quite an initial investment to get the basic storage infra (8 servers minimum with objectstore i believe).
Anyway, lots of info. Let me know if you have any more questions. I typed it on a mobile, so forgive any weird sentences or typO’s.