@mohitgupta Designing Infrastructure for Rapid Iteration...Containers per week Infrastructure...

52
@mohitgupta Designing Infrastructure for Rapid Iteration

Transcript of @mohitgupta Designing Infrastructure for Rapid Iteration...Containers per week Infrastructure...

Page 1: @mohitgupta Designing Infrastructure for Rapid Iteration...Containers per week Infrastructure Engineering 1. Improve resiliency 2. Increase engineering happiness ... docker-1 docker-2

@mohitgupta

Designing Infrastructure for Rapid Iteration

Page 2: @mohitgupta Designing Infrastructure for Rapid Iteration...Containers per week Infrastructure Engineering 1. Improve resiliency 2. Increase engineering happiness ... docker-1 docker-2

3 million students log in daily to the Clever Portal

Single sign-on Gives instant access to any app, on any browser, and any device

Help schools get the most out of learning software

Page 3: @mohitgupta Designing Infrastructure for Rapid Iteration...Containers per week Infrastructure Engineering 1. Improve resiliency 2. Increase engineering happiness ... docker-1 docker-2

>120KContainers per week

Infrastructure Engineering

1. Improve resiliency 2. Increase engineering happiness 3. Unblock complex features ~40

Engineers

>500Deployments per week

>300Applications

Page 4: @mohitgupta Designing Infrastructure for Rapid Iteration...Containers per week Infrastructure Engineering 1. Improve resiliency 2. Increase engineering happiness ... docker-1 docker-2

credits: Datadog, QCon New York

Page 5: @mohitgupta Designing Infrastructure for Rapid Iteration...Containers per week Infrastructure Engineering 1. Improve resiliency 2. Increase engineering happiness ... docker-1 docker-2

credits: xkcd

Page 6: @mohitgupta Designing Infrastructure for Rapid Iteration...Containers per week Infrastructure Engineering 1. Improve resiliency 2. Increase engineering happiness ... docker-1 docker-2

credits: xkcd, 20th Century Fox

Page 7: @mohitgupta Designing Infrastructure for Rapid Iteration...Containers per week Infrastructure Engineering 1. Improve resiliency 2. Increase engineering happiness ... docker-1 docker-2

Stumbling into Containers

The Containerization Rush

Moar Engineers, Moar Problems

Building using Control Planes

Page 8: @mohitgupta Designing Infrastructure for Rapid Iteration...Containers per week Infrastructure Engineering 1. Improve resiliency 2. Increase engineering happiness ... docker-1 docker-2

* what are these containers you speak of?

Stumbling through Containers*

Page 9: @mohitgupta Designing Infrastructure for Rapid Iteration...Containers per week Infrastructure Engineering 1. Improve resiliency 2. Increase engineering happiness ... docker-1 docker-2

10,000Schools use Clever 🎙

Page 10: @mohitgupta Designing Infrastructure for Rapid Iteration...Containers per week Infrastructure Engineering 1. Improve resiliency 2. Increase engineering happiness ... docker-1 docker-2

Zero-Downtime Rollovers

Blue Green Deployments

Immutable Deploys with History

appapp

appconfig

management

Page 11: @mohitgupta Designing Infrastructure for Rapid Iteration...Containers per week Infrastructure Engineering 1. Improve resiliency 2. Increase engineering happiness ... docker-1 docker-2
Page 12: @mohitgupta Designing Infrastructure for Rapid Iteration...Containers per week Infrastructure Engineering 1. Improve resiliency 2. Increase engineering happiness ... docker-1 docker-2

docker-1 docker-2 docker-4docker-3

my-local-changes ❯❯❯ docker run -H docker-1.internal.clever.com app

Page 13: @mohitgupta Designing Infrastructure for Rapid Iteration...Containers per week Infrastructure Engineering 1. Improve resiliency 2. Increase engineering happiness ... docker-1 docker-2

Zero-Downtime Rollovers

Blue Green Deployments

Immutable Deploys with History

🚫 🚫 🚫

docker-1 docker-2 docker-4docker-3

Page 14: @mohitgupta Designing Infrastructure for Rapid Iteration...Containers per week Infrastructure Engineering 1. Improve resiliency 2. Increase engineering happiness ... docker-1 docker-2

“Postpone evaluation of new tools that might fit better. Modify the current toolchain to move us closer to the ideal setup.”

Page 15: @mohitgupta Designing Infrastructure for Rapid Iteration...Containers per week Infrastructure Engineering 1. Improve resiliency 2. Increase engineering happiness ... docker-1 docker-2

app

app

app configmanagement

Page 16: @mohitgupta Designing Infrastructure for Rapid Iteration...Containers per week Infrastructure Engineering 1. Improve resiliency 2. Increase engineering happiness ... docker-1 docker-2

} app definitionapp

appapp

Page 17: @mohitgupta Designing Infrastructure for Rapid Iteration...Containers per week Infrastructure Engineering 1. Improve resiliency 2. Increase engineering happiness ... docker-1 docker-2

app

app

app

configmanagement

run: type: docker

Page 18: @mohitgupta Designing Infrastructure for Rapid Iteration...Containers per week Infrastructure Engineering 1. Improve resiliency 2. Increase engineering happiness ... docker-1 docker-2

Move fast and make time to think

Page 19: @mohitgupta Designing Infrastructure for Rapid Iteration...Containers per week Infrastructure Engineering 1. Improve resiliency 2. Increase engineering happiness ... docker-1 docker-2

The Containerization Rush

* here comes everybody

Page 20: @mohitgupta Designing Infrastructure for Rapid Iteration...Containers per week Infrastructure Engineering 1. Improve resiliency 2. Increase engineering happiness ... docker-1 docker-2
Page 21: @mohitgupta Designing Infrastructure for Rapid Iteration...Containers per week Infrastructure Engineering 1. Improve resiliency 2. Increase engineering happiness ... docker-1 docker-2

credits: 20th Century Fox

Page 22: @mohitgupta Designing Infrastructure for Rapid Iteration...Containers per week Infrastructure Engineering 1. Improve resiliency 2. Increase engineering happiness ... docker-1 docker-2

Twitter used it and they were neighbors

Open Source meant we could change things

AWS was supported and we could run it

Page 23: @mohitgupta Designing Infrastructure for Rapid Iteration...Containers per week Infrastructure Engineering 1. Improve resiliency 2. Increase engineering happiness ... docker-1 docker-2

Twitter had a massive Mesos team

Nobody was an expert in the Mesos codebase

Zookeeper!

The cluster is having issues again!

Page 24: @mohitgupta Designing Infrastructure for Rapid Iteration...Containers per week Infrastructure Engineering 1. Improve resiliency 2. Increase engineering happiness ... docker-1 docker-2

Fast deployments Improved instance utilization

UI and API

There was progress in important areas

Page 25: @mohitgupta Designing Infrastructure for Rapid Iteration...Containers per week Infrastructure Engineering 1. Improve resiliency 2. Increase engineering happiness ... docker-1 docker-2

Move fast and test a leap of faith.

Page 26: @mohitgupta Designing Infrastructure for Rapid Iteration...Containers per week Infrastructure Engineering 1. Improve resiliency 2. Increase engineering happiness ... docker-1 docker-2

More engineers, moar problems

* onboarding forever!

Page 27: @mohitgupta Designing Infrastructure for Rapid Iteration...Containers per week Infrastructure Engineering 1. Improve resiliency 2. Increase engineering happiness ... docker-1 docker-2

"If my code runs in production then I shouldn't have to change it for you to run it locally"

Page 28: @mohitgupta Designing Infrastructure for Rapid Iteration...Containers per week Infrastructure Engineering 1. Improve resiliency 2. Increase engineering happiness ... docker-1 docker-2

“more important to have dev stability than production velocity”

“resiliency, stability, safety !!!!”

“well thought out systems don’t have such problems”

Page 29: @mohitgupta Designing Infrastructure for Rapid Iteration...Containers per week Infrastructure Engineering 1. Improve resiliency 2. Increase engineering happiness ... docker-1 docker-2

DebuggingDependenciesUpdated values for development in my environment

Configuration

Current dependencies for walking through a feature

Logs and metrics for testing outside production

Docker Compose: how to run everything on my laptop?

Page 30: @mohitgupta Designing Infrastructure for Rapid Iteration...Containers per week Infrastructure Engineering 1. Improve resiliency 2. Increase engineering happiness ... docker-1 docker-2

A R K

a tool to supercharge development that can eventually be used in production

Page 31: @mohitgupta Designing Infrastructure for Rapid Iteration...Containers per week Infrastructure Engineering 1. Improve resiliency 2. Increase engineering happiness ... docker-1 docker-2

eng1-envschema-change-replays ux-change-review

On-Demand Development Environments

Page 32: @mohitgupta Designing Infrastructure for Rapid Iteration...Containers per week Infrastructure Engineering 1. Improve resiliency 2. Increase engineering happiness ... docker-1 docker-2
Page 33: @mohitgupta Designing Infrastructure for Rapid Iteration...Containers per week Infrastructure Engineering 1. Improve resiliency 2. Increase engineering happiness ... docker-1 docker-2

ark start —environment my-env my-app

Page 34: @mohitgupta Designing Infrastructure for Rapid Iteration...Containers per week Infrastructure Engineering 1. Improve resiliency 2. Increase engineering happiness ... docker-1 docker-2
Page 35: @mohitgupta Designing Infrastructure for Rapid Iteration...Containers per week Infrastructure Engineering 1. Improve resiliency 2. Increase engineering happiness ... docker-1 docker-2
Page 36: @mohitgupta Designing Infrastructure for Rapid Iteration...Containers per week Infrastructure Engineering 1. Improve resiliency 2. Increase engineering happiness ... docker-1 docker-2

engineers are users too.

Page 37: @mohitgupta Designing Infrastructure for Rapid Iteration...Containers per week Infrastructure Engineering 1. Improve resiliency 2. Increase engineering happiness ... docker-1 docker-2

Building Control Planes

Page 38: @mohitgupta Designing Infrastructure for Rapid Iteration...Containers per week Infrastructure Engineering 1. Improve resiliency 2. Increase engineering happiness ... docker-1 docker-2

start with thin wrappers

Page 39: @mohitgupta Designing Infrastructure for Rapid Iteration...Containers per week Infrastructure Engineering 1. Improve resiliency 2. Increase engineering happiness ... docker-1 docker-2

find your own defaults

Page 40: @mohitgupta Designing Infrastructure for Rapid Iteration...Containers per week Infrastructure Engineering 1. Improve resiliency 2. Increase engineering happiness ... docker-1 docker-2

highlight your quirks

credits: xkcd, dreamworks interactive

Page 41: @mohitgupta Designing Infrastructure for Rapid Iteration...Containers per week Infrastructure Engineering 1. Improve resiliency 2. Increase engineering happiness ... docker-1 docker-2

Owning Interactions.

outsource complexity when possible

Page 42: @mohitgupta Designing Infrastructure for Rapid Iteration...Containers per week Infrastructure Engineering 1. Improve resiliency 2. Increase engineering happiness ... docker-1 docker-2

invest in training and documentation

Page 43: @mohitgupta Designing Infrastructure for Rapid Iteration...Containers per week Infrastructure Engineering 1. Improve resiliency 2. Increase engineering happiness ... docker-1 docker-2

Changing all the time

* how we learnt to stop worrying and embrace new tools

Page 44: @mohitgupta Designing Infrastructure for Rapid Iteration...Containers per week Infrastructure Engineering 1. Improve resiliency 2. Increase engineering happiness ... docker-1 docker-2
Page 45: @mohitgupta Designing Infrastructure for Rapid Iteration...Containers per week Infrastructure Engineering 1. Improve resiliency 2. Increase engineering happiness ... docker-1 docker-2

Integration with existing tools we used

Completely managed by AWS

Met all our requirements!

Page 46: @mohitgupta Designing Infrastructure for Rapid Iteration...Containers per week Infrastructure Engineering 1. Improve resiliency 2. Increase engineering happiness ... docker-1 docker-2

A R K

Canary Deployments

Daemon Containers Cluster Autoscaling

Cross-cluster Environments

Page 47: @mohitgupta Designing Infrastructure for Rapid Iteration...Containers per week Infrastructure Engineering 1. Improve resiliency 2. Increase engineering happiness ... docker-1 docker-2

Asynchronous Workflows at Clever

● REST API and Web UI for managing workflows

● More than a million executions a week

● Over 100 asynchronous workers

Page 48: @mohitgupta Designing Infrastructure for Rapid Iteration...Containers per week Infrastructure Engineering 1. Improve resiliency 2. Increase engineering happiness ... docker-1 docker-2

Workflows

Page 49: @mohitgupta Designing Infrastructure for Rapid Iteration...Containers per week Infrastructure Engineering 1. Improve resiliency 2. Increase engineering happiness ... docker-1 docker-2

Built using AWS Batch

Page 50: @mohitgupta Designing Infrastructure for Rapid Iteration...Containers per week Infrastructure Engineering 1. Improve resiliency 2. Increase engineering happiness ... docker-1 docker-2

Built using AWS Step Functions

Page 51: @mohitgupta Designing Infrastructure for Rapid Iteration...Containers per week Infrastructure Engineering 1. Improve resiliency 2. Increase engineering happiness ... docker-1 docker-2

Control planes allow for rapid infrastructure experimentation

Page 52: @mohitgupta Designing Infrastructure for Rapid Iteration...Containers per week Infrastructure Engineering 1. Improve resiliency 2. Increase engineering happiness ... docker-1 docker-2

Questions

@mohitgupta

github.com/Clever