Server doesn't connect to SQL[+rep if you help]
#6

This is a simple explanation:
When a client connects to your server, it takes time for the user data to reach the server and get a packet back. Let's say this takes 50ms, which is a playable latency.

Imagine you have every in game player information checked against a remote MySQL server and that server has a 100-200ms latency against the game host itself (very normal for cheap server hosts).

This will create a delay for the players in game experience even though the player has a good latency.

If the server receives a packet executing OnPlayerConnect it will take 50ms from the client connects until the callback is actually called. When the player is confirmed, the callback sends a query to your MySQL server and receives the answer 200ms later, it then sends the info back to the client with 50ms latency, giving the player an actual latency of 300ms every time you execute something via MySQL.

EDIT: Of course depending on the performance and memory available for the MySQL server, while sending long queries it could take several seconds before you get a response.
Reply


Messages In This Thread
Server doesn't connect to SQL[+rep if you help] - by CopKing123 - 20.03.2016, 19:00
Re: Server doesn't connect to SQL[+rep if you help] - by introzen - 20.03.2016, 20:03
Re: Server doesn't connect to SQL[+rep if you help] - by YouServ - 20.03.2016, 20:06
Re: Server doesn't connect to SQL[+rep if you help] - by Vince - 20.03.2016, 21:29
Re: Server doesn't connect to SQL[+rep if you help] - by Infernux - 20.03.2016, 21:36
Re: Server doesn't connect to SQL[+rep if you help] - by introzen - 20.03.2016, 23:36

Forum Jump:


Users browsing this thread: 1 Guest(s)