Local database for BungeeCord
ygtdmn opened this issue ยท 14 comments
My MySQL and BungeeCord servers are in different machines. For this reason when i use ChangeSkin with MySQL, my BungeeCord server lagging because of high network connection. So if you can add SQLite, H2 or YAML database to ChangeSkin it will be great.
If the MySQL server is on the same network, you shouldn't notice any lags. Furthermore all SQL queries are processed async. For player logins it registers an intent to delay it until the query is finished (still async other plugins could run at the same time). So here you could maybe notice a delay.
If you're not on a game hoster, you can still install it on the same host too.
I don't want to setup another MySQL server :/ Also the VPS only enough for one bungeecord instance.
Also the VPS only enough for one bungeecord instance.
Because of disk space, cpu, memory?
Right now everything is fine. Cpu usage is %80, Memory usage %60, disk is almost not using. Only network is a problem.
If you run MySQL/MariaDB on the same host, it will use the loopback interface. It won't make any networking traffic.
My MySQL server is in dedicated with some spigot instances. And there is no place for any more server. BungeeCord is in another VPS.
MySQL and ChangeSkin is not in the same host.
I understood that the first time too, but I thought you answer is related to my previous post (#138 (comment)) and that you don't want host MySQL/MariaDB on the BungeeCord host, because of networking. Sorry for this misunderstanding.
I'm going to add the SQLite driver to ChangeSkin after some performance tests. For now you could do this:
https://gist.github.com/games647/d2a57abf90f707c0bd1107e432c580f3
(I know this isn't an optimal solution and is only temporarily)
Keep in mind that SQLite only supports single thread requests unlike MySQL/MariaDB that can handle parallel requests which is more optimal for BungeeCord environments with more players.
@games647 I made a plugin for this:
https://www.spigotmc.org/resources/sqlite-for-bungeecord.57191/
It was hard to do that process at every BungeeCord update.