Find player in another server (best method?)

What would be the best way to find a player that’s playing in a different server of the current game?
I was thinking MessagingService, but I feel like it’s a bit unstable.

I need this for a cross-server kick system I’m working on.

2 Likes

If you want to find player in another server MessagingService is your only choice. Even if it feels unstable there’s no other way of getting info throughout servers.

2 Likes

You should never rely on it for important game systems.

You should use datastores to store a player’s current server.

You should never rely on it for important game systems.

I want to remove them from the game if they are banned instead of having a loop that gets every player’s data, every 2 minutes etc. Perhaps it is a better solution than MessagingService due to its limits.

You can use a combination of both, in case the message fails to send.

That’s not a bad idea, actually.

However not sure how it can be implemented without removing the loop, because if MessagingService fails I have no way to reference the target.

You should be able to safely send 2 datastore requests per user per minute so the loop shouldn’t be a problem.

The current limit per key is 6 seconds, so I’d be able to send much more than just that.
Might as well implement both.

But there is a request limit per server per minute which is:

60 + (numPlayers × 10)

Sorry, it is actually 10 requests per user per minute.

Server limit
If the server size is 10 people then the server limit is 160 requests per minute

Key limit
6 seconds (cooldown)

But 60 of those requests should only be used for server things as they do not scale with more players.

And yes, I do get that a request every 6 seconds would work however take into account that you may decide to use something else that uses datastotes down the line and those won’t work as you reached your limit.

The issue has been solved.
I don’t see anything useful in this comment for me, sorry.

I’m already aware of the limits.