Viggle Fleet

During my time at Viggle, I had the opprounity to build out the infrastructure which supports all of our multiplayer games. I decided to call it Viggle Fleet!

A lot of our games are multiplayer, which meant we needed a central server for all players to connect to. On top of that, I wanted to make the system controllable through a gui and automate as much as possible. Since I was working with the Viggle AWS account, this required a lot of caution (previous employee had leaked a api key leading to 100k+ in losses, so I was required to make everything)




The dashboard

High level architecture

I took some inspiration from designing my MMO, using a distributed architecture with a single "gateway" node controlling the rest.
This gateway node would also be the steering wheel for the maintainers of this system, hosting a dashboard which can control some attributes of our servers.
I explicitly got a key with ONLY read access to viggle games eks, and thus was pretty free with giving all the servers this key. Gateway got the latest images on boot, and told the game servers which games they should be hosting (with ids so the servers can pull from eks directly)

Some design notes which might at first seem uninuitive:

Game deployment

Something I quickly realized was no all games were equal: some games had 90% of their userbase from China, other games had 90% of their userbase from India, so it didn't make sense to have the servers auto boot the same games.

Solution:
Instead of booting the same games, I made game proccess allocation assignable in the dashboard, and have the gateway be the authoritative blueprint for which games run on which servers. This led to a way better user experience, as now Chinese players who previously were forced to play on Australia servers could all play in the Asia server (by allocating all processes to serving Fight3D, our flagship game).