Hey, I’ve been working an online game project for a while. I’m using MongoDB as a primary database. The problem I’m worrying about is game server performance with MongoDB.
Let me explain the project more;
The game servers are using as microservices. Each game server connects to MongoDB directly. Because of the direct connection, I’m worrying about traffic and sync between services(servers).
There is a game character who has 100 gold in-game. Whenever he wants to buy something, the gold decreases and updates his document from MongoDB.
Is it good practice to update that much even the game has over a thousand player?
The update operation might be happen anytime. If any of the other servers(the servers not player in) wants to get player document from MongoDB, the document might be not updated.
It might be sound like game system problem but my solution will be depend on MongoDB.
Thanks in advance!