Jump to content

Synchronization of two servers


Recommended Posts

  • Active+ Member

Synchronization of two servers

Hello, I would like to know if someone knows how to synchronize two dedicated servers in a different location so that depending on the area in which you connect you give the best possible ping.

If someone knows something or sells such information you can contact me by direct message in the forum.

Regards thank you very much!

Link to comment
Share on other sites

  • Premium

Players still need to sync with the server and with other players so what you're asking is physically impossible. Unless we are talking about two different servers, in that case, you could use an ip2location database to assign them a server when they register.

  • Love 2
Link to comment
Share on other sites

  • Active+ Member
4 minutes ago, Shogun said:

Players still need to sync with the server and with other players so what you're asking is physically impossible. Unless we are talking about two different servers, in that case, you could use an ip2location database to assign them a server when they register.


What I need is to synchronize two servers located for example in Europe and another in Canada and that the two connect to a single server.  So that players who are on different continents do not have Ping problems.

Link to comment
Share on other sites

  • Premium

As I said players don't just need to communicate with the server - it's a multiplayer game, so they also need to communicate with each other, even if it's done through the server.

 

Which means your best bet is getting a server in a place where pings are as fair as possible for everyone.

 

If we are talking about Europe and America, then New York, UK or France are your best bets. It depends on your priorities and how many players are in each contintent.

  • Love 1
Link to comment
Share on other sites

  • Active+ Member
2 hours ago, Shogun said:

As I said players don't just need to communicate with the server - it's a multiplayer game, so they also need to communicate with each other, even if it's done through the server.

 

Which means your best bet is getting a server in a place where pings are as fair as possible for everyone.

 

If we are talking about Europe and America, then New York, UK or France are your best bets. It depends on your priorities and how many players are in each contintent.

 

And how do you do on your server to alleviate the high ping of Latin American players?

Link to comment
Share on other sites

  • Active+ Member
23 hours ago, Shogun said:

That's a good question. I have been reading around the internet on how to improve performance over high latency and lossy links. But there's not much on FreeBSD and game servers sadly. I'm just trying a few random sysctl and hoping for the best.

 

Thank you very much for the information.
Have a nice day

Link to comment
Share on other sites

  • 3 months later...
  • Honorable Member

Actually you should have no problem doing it. Basically the game only needs to sync you with players on the same map as you are. Guild stuffs are handled thru the db just like telling each cores about the others on startup. So if you target the same db for each cores even on different machines, it should work.

Edited by Distraught

WRnRW3H.gif

Link to comment
Share on other sites

Well, as far as I know this is not possible to do. At least in Metin2. As the information about two players might be stored in two different servers. And one of them might require the data the other one has. Or think about positions of players. Players send their locations to the server and server sends that information to the players that are connected to it. If another player is connected to a different server how are we gonna send this information to the other player that plays on a different server? 

Link to comment
Share on other sites

  • Honorable Member

Read again. The server only has to know eg. the position of others if they are on the same map with you (sorta kinda). What do you think, why do you divide cores by maps? They are each a running server instance.

When you start your server, you begin with the db because that application is going to receive a packet from each of the cores when they start running and distributes to the others.

If you look into the sources, you will find out that a lot of communication acts are not even sent to all the peers just what needs to be known on other channels too (like shouts).

It is completely irrelevant if those server instances are on the same machine or not if they get the address of the same db app.

WRnRW3H.gif

Link to comment
Share on other sites

So from what I understand you are suggesting to connect all the servers to the one master server and distribute information between them through the master server? Am I right?

 

You say server needs to know the information if players are on the same map. Let's say we have two servers one inside EU and one in NA. And we have two players, player A is connected to the server in EU and the player B is connected to the one in NA. And let's say they are on the same map. If the player A moves how are you planning to send this information to player B?

 

Link to comment
Share on other sites

  • Premium

I think what @Finnael is saying makes sense. In order to achieve synchronisation of characters' movement and information you would need to send PacketAround() through P2P so it reaches other servers. Also having one master server would solve issues like spawning regens on each server or something similar (I just guessed). 

Link to comment
Share on other sites

24 minutes ago, Distraught said:

Actually this is how the game now works. Don't put a map in more than one channel and its redirecting you between its cores.

Yes the game can work like this because all the cores are inside one machine. When one core requires the data the other core has it gets it instantly. But in this case the cores will be in different continents.

 

8 minutes ago, tierrilopes said:

Using the example above, player A has delay to communicate to the server his connected to, same does player B.  But then theres also the delay between both servers.

Considering the server-server delay, couldnt it do more harm then good in some ocasions?

Yes exactly. 

Link to comment
Share on other sites

  • Honorable Member
22 minutes ago, Sonitex said:

I think what @Finnael is saying makes sense. In order to achieve synchronisation of characters' movement and information you would need to send PacketAround() through P2P so it reaches other servers. Also having one master server would solve issues like spawning regens on each server or something similar (I just guessed). 

I type the same for the third time now. Packet around will not send anything to the peers because other cores just really don't give a shit what happened real-time with your character. Who sees you (and this is why it sends to them) is connected to the same core as you are.

 

3 minutes ago, Finnael said:

Yes the game can work like this because all the cores are inside one machine. When one core requires the data the other core has it gets it instantly. But in this case the cores will be in different continents.

 

Yes exactly. 

WHAT YOU THINK HOW THE FUCK SENDS ONE CORE THE DATA TO ALL ANOTHER? THE SAME WAY AS IF THEY WERE NOT ON THE SAME MACHINE

Edited by Distraught
  • Confused 1

WRnRW3H.gif

Link to comment
Share on other sites

  • Premium
29 minutes ago, Distraught said:

I type the same for the third time now. Packet around will not send anything to the peers because other cores just really don't give a shit what happened real-time with your character. Who sees you (and this is why it sends to them) is connected to the same core as you are.

 

Third time worked like a charm. Got it ;) (kinda)

  • Love 1
Link to comment
Share on other sites

  • 2 weeks later...
On 8/11/2020 at 6:51 PM, Distraught said:

I type the same for the third time now. Packet around will not send anything to the peers because other cores just really don't give a shit what happened real-time with your character. Who sees you (and this is why it sends to them) is connected to the same core as you are.

 

WHAT YOU THINK HOW THE FUCK SENDS ONE CORE THE DATA TO ALL ANOTHER? THE SAME WAY AS IF THEY WERE NOT ON THE SAME MACHINE

Man you gotta understand that what OP is asking about is impossible to achieve and does not even make any sense.

 

You keep talking about cores but here it's not relevant, OP wants 2 players to interact in real-time with them being on totally different servers.

To be able to interact with other players in real-time you MUST be on same core, you can spread cores on multiple servers but this has nothing to do with OP's request.

 

This could be achieved by the exchange of all data concerning the entities between cores but again refer to the quote below :

 

On 8/11/2020 at 6:39 PM, tierrilopes said:

Using the example above, player A has delay to communicate to the server his connected to, same does player B.  But then theres also the delay between both servers.

Considering the server-server delay, couldnt it do more harm then good in some ocasions?

 

Think 5 sec. about the request and what you are suggesting @Distraught and if you still don't understand I can't make it any simpler, have a nice day gameloft c++ programmer!

  • Lmao 1
Link to comment
Share on other sites

  • Honorable Member

No one defined what they mean by interacting real-time. Interacting real time can also mean like sending messages what could be achieved. What I was talking about still makes sense as I told them their possibilities, just really have your time understanding it. This construction could matter tho. You ought to understand what I am saying instead of just trying to get it personal because your message was nothing but trying to be bitchy about anything.

Edited by Distraught

WRnRW3H.gif

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.