chapter eight

8 A Multi-Cloud MMORPG

 

This chapter covers:

  • Deploying a multi-cloud load balancer for distributing application traffic across virtual machines running in AWS, Azure and GCP
  • Federating two Nomad clusters, one in AWS and one in Azure, for managing multi-cloud workloads with a single control plane
  • Running a browser-based MMORPG with Nomad
  • Rearchitecting multi-cloud projects using a mixture of managed services

Terraform is your all-in-one multi-cloud solution! Terraform allows you to dynamically provision infrastructure across multiple cloud providers, so your workflows and processes can remain the same even as the world around you changes. This chapter puts into practice all the learnings from previous chapters to give you a holistic perspective of what is possible with Terraform.

First, however, I must define what is meant by “multi-cloud”. Although often used interchangeably, the terms “hybrid cloud” and “multi-cloud” are not equivalent and should not be conveyed as such. Multi-cloud specifically means leveraging multiple cloud providers in a single context. Hybrid cloud, on the other hand, is distinct in that it refers to the union of a private cloud with one or more public clouds. While hybrid cloud could be considered a kind of multi-cloud, rarely is this done. This is because the implied level of maturity in the cloud and the sorts of problems one could normally be expected to face are different when comparing the hybrid versus the multi-cloud.

8.1           Hybrid Cloud Load Balancing

8.1.1   Architectural Overview

8.1.2   Code

8.1.3   Deploy

8.2           Deploying an MMORPG on a Federated Nomad Cluster

8.2.1   Cluster Federation 101

8.2.2   Architecture

8.2.3   Stage #1 Base Infrastructure

8.2.4   Deploying Base Infrastructure

8.2.5   Stage #2 Application Infrastructure

8.2.6   Ready Player One

8.3           Rearchitecting the MMORPG to use Managed Services

8.3.1   Code

8.3.2   Ready Player Two

8.4           Fireside Chat

8.5           Summary