Tech Support Posted July 26, 2021 Share Posted July 26, 2021 You can move database to a separate server, no problems with that. But this is not actually "load balancing the database", load balancing the database is using multiple database servers, which is not supported. Quote Link to comment Share on other sites More sharing options...
leonrak Posted August 28, 2021 Author Share Posted August 28, 2021 Is it possible to have a setup like this? copy database on 3 severs. and send 1/3 of visitors to each of them to divide loads between them Quote Link to comment Share on other sites More sharing options...
Tech Support Posted August 29, 2021 Share Posted August 29, 2021 No, this will not work correctly as far as we understand. For example when user uploads a video, it should be inserted into primary database, so that conversion engine took it and started converting. If the video will be randomly inserted into 1st, or 2nd, or 3rd database instance, it will be a mess in the data and will result in data inconsistency. This is something that we will have supported after migrating KVS frontend to a nextgen architecture. Quote Link to comment Share on other sites More sharing options...
Scumtron Posted August 29, 2022 Share Posted August 29, 2022 On 8/29/2021 at 3:25 PM, Tech Support said: No, this will not work correctly as far as we understand. For example when user uploads a video, it should be inserted into primary database, so that conversion engine took it and started converting. If the video will be randomly inserted into 1st, or 2nd, or 3rd database instance, it will be a mess in the data and will result in data inconsistency. This is something that we will have supported after migrating KVS frontend to a nextgen architecture. These 3 instances are replicated from the master, so the information on all will be identical. Quote Link to comment Share on other sites More sharing options...
Scumtron Posted August 29, 2022 Share Posted August 29, 2022 On 8/28/2021 at 2:02 PM, leonrak said: Is it possible to have a setup like this? copy database on 3 severs. and send 1/3 of visitors to each of them to divide loads between them https://www.digitalocean.com/community/tutorials/how-to-set-up-replication-in-mysql Quote Link to comment Share on other sites More sharing options...
hbarnetworks Posted August 29, 2022 Share Posted August 29, 2022 (edited) 1 hour ago, Scumtron said: https://www.digitalocean.com/community/tutorials/how-to-set-up-replication-in-mysql There is no point in doing this. Yes you then have a replica but thats all it is. Nothing will be read from this server. You cant simply do a round robin either using dns because this will cause data mismatching in the databases. best bet is to get atleast 3 MySQL (3 is minimum for galera) activate-galera (comes preinstalled with the latest mariadb). Make only 1 of the servers writeable this is easily done use proxySQL and then use proxySQL as the main SQL connection to do the loadbalancing. Setup like this can easily be googled on how to do it. FYI: this does require to set your database engine to INNODB. kvs uses MyISAM by default. Edited August 29, 2022 by hbarnetworks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.