Google Cloud – Mountkirk Games Case Study – v1

Mountkirk Games makes online, session-based, multiplayer games for mobile platforms. They build all of their games using some server-side integration. Historically, they have used cloud providers to lease physical servers.

Due to the unexpected popularity of some of their games, they have had problems scaling their global audience, application servers, MySQL databases, and analytics tools.

Their current model is to write game statistics to files and send them through an ETL tool that loads them into a centralized MySQL database for reporting.

Solution Concept

Mountkirk Games is building a new game, which they expect to be very popular. They plan to deploy the game’s backend on Google Compute Engine so they can capture streaming metrics, run intensive analytics, and take advantage of its autoscaling server environment and integrate with a managed NoSQL database.

So the key here is the company wants to deploy the new game to Google Compute Engine (not GAE or GKE) configured to scale (managed instance groups) to handle streaming metrics and analytics. It also needs to integrated with a NoSQL database (either Cloud Datastore or BigTable)

Executive Statement

Our last successful game did not scale well with our previous cloud provider, resulting in lower user adoption and affecting the game’s reputation. Our investors want more key performance indicators (KPIs) to evaluate the speed and stability of the game, as well as other metrics that provide deeper insight into usage patterns so we can adapt the game to target users. Additionally, our current technology stack cannot provide the scale we need, so we want to replace MySQL and move to an environment that provides autoscaling, low latency load balancing, and frees us up from managing physical servers.

So the key points here are the company wants to move to cloud and use more of scalable managed services without them needing to manage physical servers. Also they want to move from relational MySQL database to a managed database.

Business Requirements

  • Increase to a global footprint
    • Can be handled using Global HTTP load balancer with managed instance groups in each region.
    • Using multi-regional services like Cloud Storage, Cloud Datastore, Pub/Sub, BigQuery
  • Improve uptime – downtime is loss of players
    • can be handled using managed instance groups across zones and regions coupled with load balancer for High Availability
    • GCP managed services like Pub/Sub, Datastore provide a high uptime
  • Increase efficiency of the cloud resources we use
    • can be increased with scaling the resources as per the demand
    • can be increased further using Stackdriver metrics and monitoring
  • Reduce latency to all customers
    • can be reduced using Global HTTP load balancer, which would route the user to the closest region
    • using multi-regional resources would also help reduce latency

Technical Requirements

Requirements for Game Backend Platform

  1. Dynamically scale up or down based on game activity.
    • can be handled using autoscaling with managed instance groups with the ability to scale as per the demand
  2. Connect to a transactional database service to manage user profiles and game state.
    • can be handled using Cloud Datastore, which provides transactional NoSQL database service and is ideal for user profiles and game state
    • it does not need a relational database, so Datastore should work fine
  3. Store game activity in a timeseries database service for future analysis.
    • can be stored using BigQuery as it would provide a low cost data storage (as compared to Bigtable) for analytics 
    • other advantage of BigQuery over Bigtable in this case its multi-regional, meeting the global footprint and latency requirements
  4. As the system scales, ensure that data is not lost due to processing backlogs.
    • seems relevant for capturing streaming data and can be handled using Pub/Sub and Cloud Dataflow
  5. Run hardened Linux distro.
    • can be handled using Google Compute Engine, as it is the only compute option that would support custom Linux distro

Requirements for Game Analytics Platform

  1. Dynamically scale up or down based on game activity.
    • can be handled using GCP managed services which scale as per the demand
    • can be handled using Global HTTP load balancer and autoscaling managed instance groups
  2. Process incoming data on the fly directly from the game servers.
    • can be handled using Pub/Sub for capturing data and Cloud DataFlow for processing the data on the fly i.e real time
  3. Process data that arrives late because of slow mobile networks.
    • can be handled using Cloud Pub/Sub and Cloud DataFlow
  4. Allow queries to access at least 10 TB of historical data.
    • can be handled using BigQuery for storage and analytics
  5. Process files that are regularly uploaded by users’ mobile devices.
    • more relevant for kind of batch processing, which can be handled using storing the files in Cloud Storage and processing the same using Cloud DataFlow

Reference Architecture

Refer to Mobile Gaming Analysis Telemetry solution