Database clustering in mysql for shared hosting

actually i am tring to host a nextcloud server on my hosting (a shared hosting), but the mysql database provided by my hosting has limited capacity of 1024MB or 1GB per database but i can host unlimited databases with no storage capacity limits in total.

so for shared hosting mostly people use sqllite for setup as it is disk-based and does not come with this capacity limit,

i was searching a way to bypass this limit, the best idea i had in my mind is that i can cluster mysql databases, but then problem arises that shared hosting dosent give me root to install mysqlcluster, so i was tryin to figure out a way that how can i host multiple databases and connect them together to form a single database…

i also had and idea in mind that the server can run check on all linked databases one by one but still ideation and implementation are two different things…

any ideas for this problem?

1GB should be plenty, for a small instance. My database is about 600MB, and this installation is 8 years old.

Maybe this is of any help: Splitting databases — Nextcloud latest Administration Manual latest documentation

But to be honest, I would probably try to change the hosting provider / hosting plan if you are convinced that your database will be larger than 1GB.

And keep in mind, at a certain size/scale, shared hosting, which, by the way, I would not consider a good general recommendation for hosting a Nextcloud instance in the first place, would definitly no longer be the right choice, as you’d probably run into other limitations as well.

actually this is for learnig purposes ido not itend to deploy it for larger scale…
i was asking this just out of curosity wouldnt it be great to cluster databases in a shared hosting…

also my shared hosting plan (of premium category) can support these type to instances at a large scale as there are no lve limits on a 128 core server and has ram of 256gb with 50 tb storage common between 70 users so i guess it is equally powerful a a 2 core vps, maybe i am wrong in judgin this but still worth trying.

and this cloud be a project that could be worked upon.

I’m not an expert, but I think the term you need to look for is “database sharding”, which I believe Nextcloud now supports as of version 30.

However, I didn’t find much after a quick web search, except this issue on GitHub. There also seems to be official documentation, but it’s locked behind their Enterprise portal: Database Sharding

1 Like

yesss this is exactly what i was looking for, thanks for your help, i just wanna know wether there is a official documentaion for this or not because i am not quite familiar with database related geekey things…

Database splitting is to be a completely new function. The problem is that your Nextcloud hoster does not seem to be able to provide you with an infrastructure that is suitable for Nextcloud. That’s the real problem. What you are aiming for is just a workaround to your problem.

You can try to minimise the database. For example, you could manage fewer old file versions and rely more on real backups.

Controlling file versions and aging