(WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

90
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified, or distributed in whole or in part without the express consent of Amazon.com, Inc. November 12, 2014 | Las Vegas, NV WEB305 Migrating Your Website to AWS Eugene Ventimiglia, Director of Technical Operations, Buzzfeed Randall Hunt, AWS Solutions Architect

Transcript of (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

Page 1: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified, or distributed in whole or in part without the express consent of Amazon.com, Inc.

November 12, 2014 | Las Vegas, NV

WEB305

Migrating Your Website to AWS

Eugene Ventimiglia, Director of Technical Operations, Buzzfeed

Randall Hunt, AWS Solutions Architect

Page 2: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

2

&

Eugene Ventimiglia

Director of Tech Operations

[email protected]

@eventi

BuzzFeed VS Sandy

Page 3: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

3

That One Time BuzzFeed

Almost Broke Down

(But Didn’t)

Page 4: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

4

Evolution of

BuzzFeed

Page 5: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

2006

5

Page 6: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

2007

6

Page 7: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

2008

7

2M+

UVs

Page 8: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

2009

8

5M+

UVs

Page 9: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

2010

9

8M+

UVs

Page 10: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

10

2011

20M+

UVs

Page 11: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

11

2012

40M+

UVs

Page 12: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

12

2013

100M+

UVs

Page 13: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

13

2014

150M+

UVs

Page 14: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

14

Early Hits

Page 15: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

15

Page 16: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

16

Page 17: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

17

Page 18: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

18

Page 19: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

19

Page 20: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

20

Page 21: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

21

Page 22: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

22

This is BuzzFeed:

Page 23: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

23

This is where posts happen:

Page 24: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

24

Here’s the network

diagram of all that:

Page 25: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

25

This is where data is collected:

Page 26: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

26

Here’s the network

diagram of all that:

Page 27: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

27

The Disaster

Page 28: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

28

6:00 AM

Hurricane Sandy Hits

RecoveryDisaster

Page 29: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

7:00 PM

Phone call from

The President

29

RecoveryDisaster

WTF?

Page 30: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

7:00 PM

Assessing

the damage :(

30

RecoveryDisaster

Page 31: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

31

7:20 PM

No response from

the data center

RecoveryDisaster

Page 32: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

32

7:40 PM

Realization that Akamai

won’t make it alone

RecoveryDisaster

Page 33: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

33

8:00 PM

New content published

via BuzzFeed Tumblr

RecoveryDisaster

Page 34: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

34

Database

RecoveryDisaster8:00 PM

Locating

our resources

recent snapshot at DR site@

Page 35: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

35

Database

Codebase

RecoveryDisaster8:00 PM

Locating

our resources

recent snapshot at DR site@

@ git on CTO’s laptop

Page 36: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

36

Database

Codebase

Web, Cache, &

Terminal Servers

RecoveryDisaster8:00 PM

Locating

our resources

recent snapshot at DR site@

@

@

git on CTO’s laptop

EC2 and Puppet

Page 37: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

37

Database

Codebase

Web, Cache, &

Terminal Servers

Analytics Data

RecoveryDisaster8:00 PM

Locating

our resources

recent snapshot at DR site@

@

@

@

git on CTO’s laptop

25th floor of a flooded

skyscraper with no power

EC2 and Puppet

Page 38: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

38

Database

Codebase

Web, Cache, &

Terminal Servers

Analytics Data

New Analytics

RecoveryDisaster8:00 PM

Locating

our resources

recent snapshot at DR site@

@

@

@

@

git on CTO’s laptop

25th floor of a flooded

skyscraper with no power

still being collected, but

not aggregated

EC2 and Puppet

Page 39: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

9:00 PM

Jonah texts

datacenter’s CEO

39

RecoveryDisaster

Bro, what’s up with the server?

down for good.

Page 40: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

40

The Recovery

Page 41: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

9:00 PM

Data Recovery Plan

41

1. Spin up the BIGGEST RDS instance we can get

RecoveryDisaster

Page 42: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

9:00 PM

Data Recovery Plan

42

1. Spin up the BIGGEST RDS instance we can get

2. Export (mysqldump) from DR site

RecoveryDisaster

Page 43: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

9:00 PM

Data Recovery Plan

43

1. Spin up the BIGGEST RDS instance we can get

2. Export (mysqldump) from DR site

3. Import into RDS

RecoveryDisaster

Page 44: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

9:00 PM

Data Recovery Plan

44

1. Spin up the BIGGEST RDS instance we can get

2. Export (mysqldump) from DR site

3. Import into RDS

4. Create read replicas

RecoveryDisaster

Page 45: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

9:00 PM

Web/Terminal Server

Recovery Plan

45

1. Spin up a single EC2 Instance

RecoveryDisaster

Page 46: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

9:00 PM

Web/Terminal Server

Recovery Plan

46

1. Spin up a single EC2 Instance

2. Build and configure it w/ Puppet

RecoveryDisaster

Page 47: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

9:00 PM

Web/Terminal Server

Recovery Plan

47

1. Spin up a single EC2 Instance

2. Build and configure it w/ Puppet

3. Deploy to it w/ git

RecoveryDisaster

Page 48: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

9:00 PM

Web/Terminal Server

Recovery Plan

48

1. Spin up a single EC2 Instance

2. Build and configure it w/ Puppet

3. Deploy to it w/ git

4. Copy it a bunch of times w/ EC2 Magic

RecoveryDisaster

Page 49: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

9:00 PM

Web/Terminal Server

Recovery Plan

49

1. Spin up a single EC2 Instance

2. Build and configure it w/ Puppet

3. Deploy to it w/ git

4. Copy it a bunch of times w/ EC2 Magic

5. Glue it together w/ ELB

RecoveryDisaster

Page 50: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

9:00 PM

Memcache Server

Recovery Plan

50

1. Spin up a few high memory EC2 instances

RecoveryDisaster

Page 51: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

9:00 PM

Memcache Server

Recovery Plan

51

1. Spin up a few high memory EC2 instances

2. apt-get install memcached

RecoveryDisaster

Page 52: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

9:00 PM

Memcache Server

Recovery Plan

52

1. Spin up a few high memory EC2 instances

2. apt-get install memcached

3. ???

RecoveryDisaster

Page 53: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

9:00 PM

Memcache Server

Recovery Plan

53

1. Spin up a few high memory EC2 instances

2. apt-get install memcached

3. ???

4. Profit!

RecoveryDisaster

Page 54: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

54

Here’s the network

diagram of all that:

Page 55: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

55

9:30 PM

~Fugue State~

RecoveryDisaster

Page 56: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

8:00 AM

**Pages Served!**

56

RecoveryDisaster

Page 57: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

57

10:00 AM

Posts published

on site once again!

RecoveryDisaster

Page 58: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

58

10:01 AM

Eugene gets sleep for

the first time since Sandy :)

RecoveryDisaster

Page 59: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

59

7:00 PM

Moving database to

offsite backup in CT

RecoveryDisaster

BuzzFeed

Williamsburg

Connecticut

BuzzFeed

Page 60: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

60

7:00 PM

Press covers itself

RecoveryDisaster

Page 61: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

61

7:00 PM

Ashley wakes Eugene

up for press piece...

RecoveryDisaster

Page 62: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

62

1. Live DR slave database server

in a different data center.

2. Hot spare production web

servers in multiple regions

3. FIRE DRILLS

If Hurricane Sandy Happened Today

(What We Do Differently)

Page 63: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

63

If Hurricane Sandy Happened Today

(What I’d Do Differently)

Page 64: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

64

If Hurricane Sandy Happened Today

(What I’d Do Differently)

Page 65: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

65

Thanks!

Eugene Ventimiglia

Director of Tech Operations

[email protected]

@eventi

Page 66: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

Migrate with phases

• Assessment• Proof of concept• Data migration• Application migration• Optimize for the cloud

Page 67: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

Cloud assessment

Page 68: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

Assessment phPhase

• Financial assessment

• Security and compliance

• Technical assessment

• Define success metrics!

Page 69: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014
Page 70: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

[email protected]

@caarlco

ON-PREMISES

Experiment infrequently

Failure is expensive

Less innovation

Experiment often

Fail quickly at a low cost

More innovation

$ Millions Nearly $0

Page 71: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

http://aws.amazon.com/economics/

AWS Economics Center

Page 72: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

[email protected]

@caarlco

+ ELASTIC CAPACITY

+ NO CAPEX

+ PAY AS YOU GO

+ AVAILABLE ON-DEMAND

= NO RISKS

Page 73: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014
Page 74: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

Condé Nast

+ 500+ servers

+ Petabytes

+ 100s of databases

+ Mission-critical apps

= 40% reduction in cost

Page 75: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

Security and compliance

• Classify your data

• Identify regulatory obligations

• Identify security threats

• Know your options

Page 76: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

• Geographic isolation / choice

• Amazon VPC

• AWS Direct Connect

• Encrypted storage

• Granular permissions

Page 77: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014
Page 78: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

Dow Jones

• Migration in 6 weeks

• HA with AZs

• B(ring)YO licences

• 30% increase in development velocity

• 25% cost savings per year

Page 79: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

Technical assessment

• Which apps do you move first?

• What can we reuse?

• Latency reqs?

• Bandwidth reqs?

Page 80: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

Proof of concept

Page 81: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

Learn the tools

• Build a non-production MVP

• Learn to use the CLI, APIs, console, etc.

• Now take it to production:

– Overcome legal, cultural, etc. problems

– Identify problems with your assessment

– Try to break it

Page 82: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

Assessment

Proof of concept

Page 83: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

Data migration

Page 84: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

Amazon storage landscape

• Amazon S3

• Ephemeral storage

• Amazon EBS

• Amazon Glacier

• Amazon ElastiCache

• Amazon RDS

Page 85: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

Import/export service

Page 86: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

Application migration

Page 87: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

Migration strategies

• Forklift (AKA buzzfeed/sandy):

– Move it all at once

– Best for: low latency, archival

• Hybrid

– Low risk

Page 88: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

Optimize for the cloud

Page 89: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

Spot instances!

Page 90: (WEB305) Migrating Your Website to AWS | AWS re:Invent 2014

Please give us your feedback on this session.

Complete session evaluations and earn re:Invent swag.

http://bit.ly/awsevals