Dear all,
So i’ve been reading a lot about different cases for multiple Nextcloud servers sync and kinda cluster way usage here on forums, on github and owncloud’s github also. The fanciest ways with lots of “birds language” terms (sic!) like * Corosync / Pacemaker cluster and DRBD were suggested here, in that thread, dated back 2016…
Now it’s almost 2019 and I wonder, if something has changed, as I have a real complicated usage scenario to present and discuss:
Small company operating in multiple countries around the globe (from Singapore to Peru and Brazil, back to EU and Russia) with HQ in UAE.
All on-premises infrastructure is in HQ, but Internet in UAE is a sad joke and close to non-existent. (prices will also surprise you a bit - for dedicated 100mbps 1:1 Internet connection line with static IP Etisalat requested about 15000USD per month - kid you not)
Full Details down below
Currently that company has 2 Internet connection links:
Primary: asynchronous 300\30mbps pppoe link with dynamic IP
Mail only link: 1:1 5mbps link with static IP (also crazy price about 1000USD/month)
Now, it needs to be mentioned that despite theoretical 300\30mbps connection as per contract, real life VPN connection speeds are as such:
North America, Canada, Russia, Germany - 1.5-2.5Mbps
South America - not tested
India, Singapore - 10-15Mbps
Also, you can’t argue in UAE, as officially ALL VPN type connections are forbidden by law, so they are heavily rate limited as far, as I can tell. (Also no VoIP services and video\audio messengers are operational there - to give you full picture)
Now, company struggles to achieve file sharing and exchange between different countries with appropriate speeds (normally they transfer their proprietary scan data file sized 2-60GB per file), so in case of 1.5mbps VPN performance, you can imagine how long it would take…
What I suggested is to use Amazon AWS + Nextcloud.
Amazon environment config
Frankfurt: (being a central geographical location)
EC2 instance for Nextcloud
EC2 instance for RODC (Windows readonly domain controller)
RDS DB (cloud mysql instance with all fancy cloud options for DBs) for nextcloud
AWS S3 storage as external storage for Nextcloud (not connected as primary, as with primary storage it stores metadata within S3 bucket, which prevents external direct uploads\updates, etc - correct me if I’m wrong)
Route53 for latency based DNS routing to different Nextcloud instances in different AWS regions (Mumbai, Singapore, Canada, Brazil, Germany) related to enduser\client current location
Now, Frankfurt being a central location hosts S3 bucket for all instances as a shared file storage, an RODC domain controller to speed up AD domain based user auth and is using RDS DB for Nexcloud - everything is located in the same AWS VPC (which is basically like local dedicated VLAN in terms of AWS)
HQ office has it’s poor direct VPN connection to AWS in Frankfurt (take a look at config details above) ONLY to sync RODC with AD. (or for management also)
All other geographically distributed Nexcloud instances in other mentioned regions are to share the same RDS database, the same S3 bucket and the same RODC auth server using VPC peering (another AWS term) so it will be almost no latency at all between all of it.
The limitation here is physical data upload speed from UAE to AWS.
The only usable option in that case is to use S3 acceleration (local CDN connection endpoints for S3) which really works for uploads (tested), but to be able to use that you need a local UAE Nexcloud instance, which is already deployed and operational.
Now the real question for Nextclouds sync:
- Would ot work with multiple Nexcloud instances around the world all sharing one RDS DB and sharing the same S3 bucket as external data storage? (instances config are the same everywhere using the same auth. backend LDAP connected to RODC in Frankfurt region so all users will be the same also)
- UAE Nextcloud instance will not use AWS RDS DB directly because of connection speed but will use separate local mysql DB still using same S3 bucket at external data storage and same auth backend with the same AD domain. Will that work?
- If option #2 will not work, could I use Nextcloud federation for UAE instance to be able to achieve seamless connectivity, file sharing ,permissions and file uploading capabilities with all other geographically distributed Nextcloud instances?
Wow… It turned out to be very long, sorry for that… If anyone will take time to dive into it…
Regards,
Vladimir.