Sign in to follow this  
gfxgangsta

Optimizing database/server interaction with players across multiple servers

Recommended Posts

gfxgangsta    806

I'm working on a social game in which clients, for scalability's sake, are assigned a game server to play on. That way, there can be a limit to the number of players per game server. Unfortunately, players on one server should be able to interact with players on a different server (i.e. visiting friends, etc). My current thought is to use a centralized server which holds the shared data. Ideally, only the game servers would access the central server. But because some of the shared data is unique per player (i.e. gathering a list of actions that a player and their friends have done as a group), this would mean that possibly all players could hit the central server at the same time. Even though that might be very unlikely, this approach sounds a bit inefficient, and may get in the way of scaling the game. Is there a best practice as far as sharing data across multiple game servers? Another idea is to still use a centralized server but replicate/mirror the data on the game servers, perhaps on a schedule, where it doesn't matter if the game server's data is not 100% up-to-date. This approach wouldn't need to hit the central server, but it means making sure to sync the values correctly with the central server (it might be two-way interaction in case the player can have an effect on the values). Thoughts?

 

Thanks!

Share this post


Link to post
Share on other sites
hplus0603    11356

Is there a best practice as far as sharing data across multiple game servers?

Use a unified data store. Application (game) servers are different from data stores (databases, Redis, whatever.)
Use a data store that can scale -- application-level sharding, or partition tables, or similar.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this