I’m in the design and planning phase for a mobile app multiplayer game I want to build.

I could use some advice on the backend architecture and tech stack, mainly with respect to scalability and modularity. I’m looking for suggestions on how to correctly deconstruct the service into multiple microservices, as well as what cloud solutions to use from the big providers like AWS/GCP/Azure.

I think of the service as four layers

  1. User layer
    • database + app
    • registration/authentication, friends/followings, user-wide statistics/rankings
    • read heavy; medium load
  2. Match layer
    • app
    • live multiplayer matches
    • temporary; all matches eventually end
    • very network heavy due to full-duplex nature of multiplayer and chat; high load
  3. Lobby layer
    • database + app
    • CRUD for matches
    • read and write heavy; high load
  4. Store layer
    • database + app
    • buying in-game items
    • read heavy; low load

The apps need to be horizontally scalable. The match app especially needs to be able to bring instances up/down as matches start/end. Docker and Kubernetes comes to mind, as do cloud products such as AWS EC2 and GCP App Engine

The databases need to be able to shard by a custom policy should they exceed capacity. I think all the big cloud providers have have a managed database product that can do this.

With respect to cloud providers and their products, I would naturally like to avoid vendor lock-in and keep costs reasonable. Using multiple providers simultaneously is acceptable.

Somehow all of this needs to be unified under a single api and authentication system. So, what would you do? Would you architect it a different way? What tools/products would you use?

New contributor
bdewey is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

put on hold as too broad by gnat, Blrfl, Greg Burghardt, TheCatWhisperer, Thomas Owens Jan 11 at 9:56

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    You've got a good understanding of your problem here, but what question are you actually asking? – Kain0_0 Jan 10 at 22:37