34
Building a Planet-Scale Architecture the Easy Way Sebastian Weigand @ThatDevopsGuy

Building a Planet-Scale Architecture the Easy Way...Requirements 1. Distributed. The system has to run microservices because that’s how you do tough stuff right. 2. Reliable. The

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Building a Planet-Scale Architecture the Easy Way...Requirements 1. Distributed. The system has to run microservices because that’s how you do tough stuff right. 2. Reliable. The

Building a Planet-Scale Architecture theEasy Way

Sebastian Weigand@ThatDevopsGuy

Page 2: Building a Planet-Scale Architecture the Easy Way...Requirements 1. Distributed. The system has to run microservices because that’s how you do tough stuff right. 2. Reliable. The

Master plan

01Intro

Who I am, what we’re doing here.

02The Problem

Building block basics.

03The Solution

It’s gotta run somewhere.

Page 3: Building a Planet-Scale Architecture the Easy Way...Requirements 1. Distributed. The system has to run microservices because that’s how you do tough stuff right. 2. Reliable. The

01Introduction

Page 4: Building a Planet-Scale Architecture the Easy Way...Requirements 1. Distributed. The system has to run microservices because that’s how you do tough stuff right. 2. Reliable. The

● “That Devops Guy”

● Sysadmin for a little over 15 years

● Cloud dude for almost a decade

● Solution specialist in NYC

● Has a Tux tattoo

About me

Page 5: Building a Planet-Scale Architecture the Easy Way...Requirements 1. Distributed. The system has to run microservices because that’s how you do tough stuff right. 2. Reliable. The

02The Problem

Page 6: Building a Planet-Scale Architecture the Easy Way...Requirements 1. Distributed. The system has to run microservices because that’s how you do tough stuff right. 2. Reliable. The

Requirements

1. Distributed. The system has to run microservices because that’s how you do tough stuff right.

2. Reliable. The system should recover if one part of it fails, preferably seamlessly to the users.

3. Scalable. We’ve got to support tons of users, or very few, and we want just-the-right-sizing.

4. Simple. Don’t want a complex system of systems to enable previous requirements.

Distributed

Reliable

Scalable

1

2

3

Simple4

Page 7: Building a Planet-Scale Architecture the Easy Way...Requirements 1. Distributed. The system has to run microservices because that’s how you do tough stuff right. 2. Reliable. The

Infrastructure

Page 8: Building a Planet-Scale Architecture the Easy Way...Requirements 1. Distributed. The system has to run microservices because that’s how you do tough stuff right. 2. Reliable. The

Tenets of a good distributed system

● Automated Scheduling● Health Checking● Various Deployment Methods● Load Balancing● Centralized Logging● Centralized Monitoring● Automated Bin packing ● Responsive Autoscaling● Managing Secrets● Managing Application Configuration

● Built-in Service Discovery● Rolling back Deployments● Responsive Autoscaling● Accommodating Different QoS● Stable Networking/VIPs● Application Resiliency● Role Based Access Control● Primitives for Isolation● Mounting Storage Volumes● Long-Running v. Batch Apps

Page 9: Building a Planet-Scale Architecture the Easy Way...Requirements 1. Distributed. The system has to run microservices because that’s how you do tough stuff right. 2. Reliable. The

What about data?

Page 10: Building a Planet-Scale Architecture the Easy Way...Requirements 1. Distributed. The system has to run microservices because that’s how you do tough stuff right. 2. Reliable. The

Two big types of data

Unstructured / Blob● Static stuff

● Data lake-type stuff

● Fast stuff

Structured / Schema● RDBMS stuff

● OLTP stuff

● Fast, updated stuff

Page 11: Building a Planet-Scale Architecture the Easy Way...Requirements 1. Distributed. The system has to run microservices because that’s how you do tough stuff right. 2. Reliable. The

Keep the non-devs happy

Page 12: Building a Planet-Scale Architecture the Easy Way...Requirements 1. Distributed. The system has to run microservices because that’s how you do tough stuff right. 2. Reliable. The

Boring yet super-important stuff

● Proper authentication and authorization for users, developers, and operators

● Audit logging● Centralized management of global componentry● Cost detailing, chargeback, and optimization● Load testing● Distributed tracing● Source control repositories● Code review● Automated builds● Automated deployments● Pizza delivered to the office

● Programmatic canary deployment mechanisms● Automated rollbacks● Beer with the pizza● Logging and metrics storage and analytics● Artifact storage and retrieval● Fine-grained tagging/labeling● Dessert after the pizza● Autoscaling based on proper SLIs● Automatic SLO and error budget computation● Production debugging capabilities● Multi-homed connectivity● Every third Monday off, because Mondays

Page 13: Building a Planet-Scale Architecture the Easy Way...Requirements 1. Distributed. The system has to run microservices because that’s how you do tough stuff right. 2. Reliable. The

03The Solution

Page 14: Building a Planet-Scale Architecture the Easy Way...Requirements 1. Distributed. The system has to run microservices because that’s how you do tough stuff right. 2. Reliable. The

Infrastructure

Page 15: Building a Planet-Scale Architecture the Easy Way...Requirements 1. Distributed. The system has to run microservices because that’s how you do tough stuff right. 2. Reliable. The

Tenets of a good distributed system

● Automated Scheduling● Health Checking● Various Deployment Methods● Load Balancing across Containers● Centralized Logging● Centralized Monitoring● Automated Bin packing ● Responsive Autoscaling● Managing Secrets● Managing Application Configuration

● Built-in Service Discovery● Rolling back Deployments● Responsive Autoscaling● Accommodating Different QoS● Stable Networking/VIPs● Application Resiliency● Role Based Access Control● Primitives for Isolation● Mounting Storage Volumes● Long-Running v. Batch Apps

Page 16: Building a Planet-Scale Architecture the Easy Way...Requirements 1. Distributed. The system has to run microservices because that’s how you do tough stuff right. 2. Reliable. The

Enter Kubernetes

● Automated Scheduling● Health Checking● Various Deployment Methods● Load Balancing across Containers● Centralized Logging● Centralized Monitoring● Automated Bin packing ● Responsive Autoscaling● Managing Secrets● Managing Application Configuration

● Built-in Service Discovery● Rolling back Deployments● Responsive Autoscaling● Accommodating Different QoS● Stable Networking/VIPs● Container Resiliency● Role Based Access Control● Primitives for Isolation● Mounting Storage Volumes● Long-Running v. Batch Apps

Page 17: Building a Planet-Scale Architecture the Easy Way...Requirements 1. Distributed. The system has to run microservices because that’s how you do tough stuff right. 2. Reliable. The

Specifically GKE...

● Automated Scheduling● Health Checking● Various Deployment Methods● Load Balancing across Containers● Centralized Logging● Centralized Monitoring● Automated Bin packing ● Responsive Autoscaling● Managing Secrets● Managing Application Configuration

● Built-in Service Discovery● Rolling back Deployments● Responsive Autoscaling● Accommodating Different QoS● Stable Networking/VIPs● Container Resiliency● Role Based Access Control● Primitives for Isolation● Mounting Storage Volumes● Long-Running v. Batch Apps

Page 18: Building a Planet-Scale Architecture the Easy Way...Requirements 1. Distributed. The system has to run microservices because that’s how you do tough stuff right. 2. Reliable. The

Updated, as GKE used to be called “Google Container Engine”

Kubernetes

Page 19: Building a Planet-Scale Architecture the Easy Way...Requirements 1. Distributed. The system has to run microservices because that’s how you do tough stuff right. 2. Reliable. The

Specifically GKE +Multi-Cluster Ingress

● Global load balancing

● One anycast IP

● Single A-record and you’re done

Page 20: Building a Planet-Scale Architecture the Easy Way...Requirements 1. Distributed. The system has to run microservices because that’s how you do tough stuff right. 2. Reliable. The

… or if you prefer ...

Page 21: Building a Planet-Scale Architecture the Easy Way...Requirements 1. Distributed. The system has to run microservices because that’s how you do tough stuff right. 2. Reliable. The

Traffic Director(for them service meshes)

● Envoy configs made easy

● Centralized health checking

● Traffic-driven autoscaling

Page 22: Building a Planet-Scale Architecture the Easy Way...Requirements 1. Distributed. The system has to run microservices because that’s how you do tough stuff right. 2. Reliable. The

Blob Storage

Page 23: Building a Planet-Scale Architecture the Easy Way...Requirements 1. Distributed. The system has to run microservices because that’s how you do tough stuff right. 2. Reliable. The

Multi-Regional, CDN-FrontedCloud Storage

● Auto-optimizing direct reads

● Cacheable content at 96 edge locations

● Global routing

Page 24: Building a Planet-Scale Architecture the Easy Way...Requirements 1. Distributed. The system has to run microservices because that’s how you do tough stuff right. 2. Reliable. The

Structured Data

Page 25: Building a Planet-Scale Architecture the Easy Way...Requirements 1. Distributed. The system has to run microservices because that’s how you do tough stuff right. 2. Reliable. The

Spanner Keeps it SimpleCloud Spanner Traditional Relational Traditional Non-relational

Schema ✓ Yes ✓ Yes 🅇 No

SQL ✓ Yes ✓ Yes 🅇 No

Consistency ✓ Strong ✓ Strong 🅇 Eventual

Availability ✓ High 🅇 Failover ✓ High

Scalability ✓ Horizontal 🅇 Vertical ✓ Horizontal

Replication ✓ Automatic ↻ Configurable ↻ Configurable

Page 26: Building a Planet-Scale Architecture the Easy Way...Requirements 1. Distributed. The system has to run microservices because that’s how you do tough stuff right. 2. Reliable. The

How is this possible?

Page 27: Building a Planet-Scale Architecture the Easy Way...Requirements 1. Distributed. The system has to run microservices because that’s how you do tough stuff right. 2. Reliable. The

GoogleCloudPlatform134 points of presence and13 subsea cable investments around the globe

Network

Edge pointsof presence

Current regionsand number of zones

Future regionsand number of zones 3

3

3

3

3

33

3

3 33

3

3

34

3

3

33

3

3

3 3

Page 28: Building a Planet-Scale Architecture the Easy Way...Requirements 1. Distributed. The system has to run microservices because that’s how you do tough stuff right. 2. Reliable. The

High-level architecture

Page 29: Building a Planet-Scale Architecture the Easy Way...Requirements 1. Distributed. The system has to run microservices because that’s how you do tough stuff right. 2. Reliable. The

Traffic Director: Cross-region failover and overflow

Page 30: Building a Planet-Scale Architecture the Easy Way...Requirements 1. Distributed. The system has to run microservices because that’s how you do tough stuff right. 2. Reliable. The

MayaCalifornia US-central1

Asia-southeast1Shen

Singapore

Traffic Director

Global Architecture

Page 31: Building a Planet-Scale Architecture the Easy Way...Requirements 1. Distributed. The system has to run microservices because that’s how you do tough stuff right. 2. Reliable. The

Conclusion

1. Distributed. Kubernetes runs my microservices, in multiple clusters around the planet.

2. Reliable. Fault-tolerant global load balancing ensures delivery of requests across the globe.

3. Scalable. Pods and clusters scale up and down, are right-sized, and support serverless workloads.

4. Simple. A single anycast IP, a few clicks in the console, and my planet-scale system is up-and-running, with little management overhead.

Distributed

Reliable

Scalable

Simple✓

Page 32: Building a Planet-Scale Architecture the Easy Way...Requirements 1. Distributed. The system has to run microservices because that’s how you do tough stuff right. 2. Reliable. The

Don’t forget process...

Page 33: Building a Planet-Scale Architecture the Easy Way...Requirements 1. Distributed. The system has to run microservices because that’s how you do tough stuff right. 2. Reliable. The

How about some SRE with that DevOps?

Come find me after, I’d be happy to chat!

Page 34: Building a Planet-Scale Architecture the Easy Way...Requirements 1. Distributed. The system has to run microservices because that’s how you do tough stuff right. 2. Reliable. The

That’s a wrap.