Hi!
I have 3 Linux-based physical servers, that are available to use.
To equalize the load between them, I have the following plan:
Server #1 is the game server.
Server #2 is the database server.
and Server #3 will be a secondary database server.
The SQL data is shared between server #2 and #3. But on server #3 other things are running too. I want to make the following script:
Server #1 pings Server #2, and if it would return nil or false, or just simply a too high delay, Server #3 would do the SQL query.
It may sound a bit foolish to you, but this is for practice for me. Can you help me with the function, that pings given ip addresses, and if there is packet loss or too high delay(250+ms) it would return nil or false? Yours, faithfully.
Question
rusztamas
Hi!
I have 3 Linux-based physical servers, that are available to use.
To equalize the load between them, I have the following plan:
Server #1 is the game server.
Server #2 is the database server.
and Server #3 will be a secondary database server.
The SQL data is shared between server #2 and #3. But on server #3 other things are running too. I want to make the following script:
Server #1 pings Server #2, and if it would return nil or false, or just simply a too high delay, Server #3 would do the SQL query.
It may sound a bit foolish to you, but this is for practice for me. Can you help me with the function, that pings given ip addresses, and if there is packet loss or too high delay(250+ms) it would return nil or false? Yours, faithfully.
Link to comment
1 answer to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now