Cloud Notes
Understanding multi-cloud architecture where organizations use services from multiple cloud providers to avoid vendor lock-in, optimize costs, and leverage best-of-breed services.
A multi-cloud strategy involves using two or more cloud computing platforms from different providers to run applications and services. Organizations adopt multi-cloud to avoid vendor lock-in, optimize costs, leverage best-of-breed services, and improve resilience.
Multi-Cloud Architecture
Why Organizations Choose Multi-Cloud
| Reason | Description |
|---|---|
| Avoid Vendor Lock-in | Not dependent on a single provider |
| Best-of-Breed | Use each provider's strongest services |
| Cost Optimization | Leverage competitive pricing |
| Compliance | Meet data residency requirements across regions |
| Resilience | Survive a single provider's outage |
| Negotiation Leverage | Better pricing through competition |
Multi-Cloud with Terraform
# Terraform multi-cloud deployment
# AWS Provider
provider "aws" {
region = "us-east-1"
}
# Azure Provider
provider "azurerm" {
features {}
}
# GCP Provider
provider "google" {
project = "my-project"
region = "us-central1"
}
# Deploy web servers on AWS
resource "aws_instance" "web" {
ami = "ami-0c55b159cbfafe1f0"
instance_type = "t3.medium"
count = 3
tags = { Name = "web-server" }
}
# Deploy database on Azure
resource "azurerm_postgresql_server" "db" {
name = "app-database"
location = "East US"
resource_group_name = azurerm_resource_group.main.name
sku_name = "GP_Gen5_4"
version = "11"
}
# Deploy analytics on GCP
resource "google_bigquery_dataset" "analytics" {
dataset_id = "app_analytics"
location = "US"
}Multi-Cloud with Kubernetes
# Kubernetes Federation across clouds
apiVersion: types.kubefed.io/v1beta1
kind: FederatedDeployment
metadata:
name: web-app
namespace: production
spec:
template:
spec:
replicas: 6
selector:
matchLabels:
app: web-app
template:
spec:
containers:
- name: web
image: myapp:v2.0
ports:
- containerPort: 8080
placement:
clusters:
- name: aws-eks-cluster
- name: azure-aks-cluster
- name: gcp-gke-cluster
overrides:
- clusterName: aws-eks-cluster
clusterOverrides:
- path: "/spec/replicas"
value: 3
- clusterName: azure-aks-cluster
clusterOverrides:
- path: "/spec/replicas"
value: 2
- clusterName: gcp-gke-cluster
clusterOverrides:
- path: "/spec/replicas"
value: 1Best-of-Breed Service Selection
| Use Case | Best Provider | Reason |
|---|---|---|
| Machine Learning | GCP (Vertex AI) | TensorFlow integration, TPUs |
| Enterprise Apps | Azure | Active Directory, Office integration |
| Web Infrastructure | AWS | Largest service catalog, maturity |
| Data Analytics | GCP (BigQuery) | Serverless, fast, cost-effective |
| Gaming | AWS (GameLift) | Global low-latency infrastructure |
| IoT | AWS (IoT Core) | Most comprehensive IoT services |
Challenges of Multi-Cloud
Multi-Cloud Management Tools
# Terraform - Infrastructure across clouds
terraform init
terraform plan
terraform apply
# Pulumi - Multi-cloud with programming languages
pulumi up --stack production
# Kubernetes - Container orchestration anywhere
kubectl config use-context aws-cluster
kubectl config use-context azure-cluster
# Cost management
# Use tools like CloudHealth, Spot.io, or FlexeraInterview Questions
- What is multi-cloud and how does it differ from hybrid cloud?
Multi-cloud uses multiple public cloud providers (AWS + Azure + GCP), while hybrid cloud combines private (on-premises) with public cloud. Multi-cloud is about using best services from different providers; hybrid is about bridging on-premises with cloud.
- What are the main benefits and risks of a multi-cloud strategy?
Benefits: avoid vendor lock-in, best-of-breed services, improved resilience, competitive pricing. Risks: increased complexity, skill gaps (need expertise in multiple platforms), data transfer costs, and harder security management.
- How does Terraform help manage multi-cloud environments?
Terraform provides a single language (HCL) to define infrastructure across any cloud provider. It maintains state for all resources, enables consistent workflows, and allows teams to manage AWS, Azure, and GCP from a unified codebase.
- What challenges arise when running databases across multiple clouds?
Data synchronization latency, cross-cloud network costs, inconsistent backup/recovery procedures, different encryption standards, and the complexity of maintaining consistent data access patterns across providers.
- How do organizations handle authentication across multiple cloud providers?
Through identity federation (using SAML/OIDC), centralized identity providers (Okta, Azure AD), cross-cloud IAM role assumptions, and service mesh architectures that handle authentication at the network level.
Exam Focus
Revise definitions, diagrams, examples, and short-answer points for Multi-Cloud Strategy.
Interview Use
Prepare one clear explanation, one practical example, and one common mistake for this Cloud Computing topic.
Search Terms
cloud-computing, cloud computing, cloud, computing, deployment, models, multi, multi-cloud strategy
Related Cloud Computing Topics