(dev309) from asgard to zuul: how netflix’s proven open source tools can help accelerate and scale...

73

Upload: amazon-web-services

Post on 24-Jun-2015

918 views

Category:

Technology


4 download

DESCRIPTION

Learn how you can leverage the many Netflix Open Source tools to help grow your services to web-scale, and make them robust and resilient. We cover a variety of the OSS components-from operational tools like Asgard and Simian Army, to core services and libraries like Zuul, Eureka, Archaius, and Hystrix, plus a variety of security and big data tools. We walk through a sample application to illustrate how the many components fit together to build a cohesive solution.

TRANSCRIPT

Page 1: (DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help Accelerate and Scale Your Services | AWS re:Invent 2014
Page 2: (DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help Accelerate and Scale Your Services | AWS re:Invent 2014
Page 3: (DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help Accelerate and Scale Your Services | AWS re:Invent 2014

Growth

Page 4: (DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help Accelerate and Scale Your Services | AWS re:Invent 2014

Data Center

MySQL

Middle Tier

Web UI / Front End API

Page 5: (DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help Accelerate and Scale Your Services | AWS re:Invent 2014

Regional Load Balancers Regional Load Balancers

Page 6: (DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help Accelerate and Scale Your Services | AWS re:Invent 2014

API or Web Calls

memcached

Cassandra

Web service

S3 bucket

Page 7: (DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help Accelerate and Scale Your Services | AWS re:Invent 2014

We’re here to help you get to global scale…

Apache Licensed Cloud Native OSS

http://netflix.github.com

Page 8: (DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help Accelerate and Scale Your Services | AWS re:Invent 2014
Page 9: (DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help Accelerate and Scale Your Services | AWS re:Invent 2014
Page 10: (DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help Accelerate and Scale Your Services | AWS re:Invent 2014
Page 11: (DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help Accelerate and Scale Your Services | AWS re:Invent 2014
Page 12: (DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help Accelerate and Scale Your Services | AWS re:Invent 2014

Micro service Implementation

Web App

Front End

(REST

services)

Hystr

ix

Call “Auth Service”

Ribbon REST client

with Eureka

Fallback

Implementation Karyon

App Service

(auth-service)

Eureka

Server(s)

Page 13: (DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help Accelerate and Scale Your Services | AWS re:Invent 2014

Karyon Eureka

Ribbon

Hystrix

Page 14: (DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help Accelerate and Scale Your Services | AWS re:Invent 2014
Page 15: (DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help Accelerate and Scale Your Services | AWS re:Invent 2014
Page 16: (DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help Accelerate and Scale Your Services | AWS re:Invent 2014
Page 17: (DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help Accelerate and Scale Your Services | AWS re:Invent 2014
Page 18: (DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help Accelerate and Scale Your Services | AWS re:Invent 2014

Speed

Hardware Will FailSlowly Changing

Large Scale

Everything Is BrokenRapid Change

Large Scale

Everything WorksSlowly Changing

Small Scale

Hardware Will FailRapid Change

Small Scale

Scale

Page 19: (DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help Accelerate and Scale Your Services | AWS re:Invent 2014
Page 20: (DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help Accelerate and Scale Your Services | AWS re:Invent 2014
Page 21: (DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help Accelerate and Scale Your Services | AWS re:Invent 2014
Page 22: (DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help Accelerate and Scale Your Services | AWS re:Invent 2014

Regional Load Balancers Regional Load Balancers

Page 23: (DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help Accelerate and Scale Your Services | AWS re:Invent 2014
Page 24: (DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help Accelerate and Scale Your Services | AWS re:Invent 2014
Page 25: (DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help Accelerate and Scale Your Services | AWS re:Invent 2014
Page 26: (DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help Accelerate and Scale Your Services | AWS re:Invent 2014

Micro service Implementation

Web App

Front End

(REST

services)

Hystr

ix

Call “Auth Service”

Ribbon REST client

with Eureka

Fallback

Implementation Karyon

App Service

(auth-service)

Eureka

Server(s)

Page 27: (DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help Accelerate and Scale Your Services | AWS re:Invent 2014
Page 28: (DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help Accelerate and Scale Your Services | AWS re:Invent 2014
Page 29: (DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help Accelerate and Scale Your Services | AWS re:Invent 2014
Page 30: (DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help Accelerate and Scale Your Services | AWS re:Invent 2014
Page 31: (DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help Accelerate and Scale Your Services | AWS re:Invent 2014
Page 32: (DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help Accelerate and Scale Your Services | AWS re:Invent 2014

Client

A

p

a

c

h

e

Eureka (Service

Registry)

Server (Karyon)

Apache

Tomcat

Ribbon

Load

Balancing

Eureka

Integration

Metrics

(Servo)

Bootstrapping (Governator)

Metrics (Servo)

Admin ConsoleHTTP

Eureka Integration

Registration

Fetch Registry

H

T

T

P

C

L

I

E

N

T

H

y

s

t

r

i

x

E

V

C

a

c

h

e

Page 33: (DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help Accelerate and Scale Your Services | AWS re:Invent 2014

Eureka (Service

Registry)

Client (Ribbon 2.0) Server (Karyon)

Ribbon Transport

Load

Balancing

Eureka

Integration

Metrics

(Servo)

Bootstrapping (Governator)

Metrics (Servo)

Admin Console

HTTP

Eureka Integration

Registration

Fetch Registry

Ribbon

Hystrix

EVCache

R

x

N

e

t

t

y

RxNetty

UDP

TCP

WebSockets

SSE

Page 34: (DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help Accelerate and Scale Your Services | AWS re:Invent 2014

@ArchaiusBootstrap@KaryonBootstrap(name = "hello-netflix-oss")@Modules(include = {HelloNossApp.KaryonJerseyModuleImpl.class, KaryonWebAdminModule.class, KaryonEurekaModule.class})public final class HelloNossApp {

public static class KaryonJerseyModuleImpl extends KaryonJerseyModule {protected void configure() {

super.configure();bind(AuthenticationService.class).to(AuthenticationServiceImpl.class);

}public int serverPort() { return 8888; }public int shutdownPort() { return 8899; }public void configureInterceptors(GovernatorHttpInterceptorSupport<ByteBuf, ByteBuf> interceptorSupport) {

interceptorSupport.forUri("/hello").interceptIn(AuthInterceptor.class);}

}}

Page 35: (DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help Accelerate and Scale Your Services | AWS re:Invent 2014

interface

recommendationsByUserId @Var "userId"

@Http(method = HttpMethod.GET, uriTemplate="/users/{userId}/recommendations")

@Hystrix(fallbackHandler = RecommendationFallbackHandler.class)

@EvCache(name = "movie-rec", appName = "movieService", cacheKeyTemplate = "{userId}")

MovieService movieService = Ribbon.from(MovieService.class);

Observable<Recommendations> result =

movieService.recommendationsByUserId(“user1”)

.toObservable();

Page 36: (DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help Accelerate and Scale Your Services | AWS re:Invent 2014

createHttpResourceGroup "movieService"

newRequestTemplate "recommendationsByUserId"

"GET"

"/users/{userId}/recommendations"

requestBuilder

"userId" “user1”

Page 37: (DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help Accelerate and Scale Your Services | AWS re:Invent 2014
Page 38: (DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help Accelerate and Scale Your Services | AWS re:Invent 2014
Page 39: (DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help Accelerate and Scale Your Services | AWS re:Invent 2014
Page 40: (DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help Accelerate and Scale Your Services | AWS re:Invent 2014

AZ1 AZ2 AZ3

Regional Load Balancers

Zuul – Traffic Shaping/Routing

Data Data Data

Geo-located

Chaos Kong

Chaos Kong

AZ1 AZ2 AZ3

Regional Load Balancers

Zuul – Traffic Shaping/Routing

Data Data Data

Customer

Device

Page 41: (DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help Accelerate and Scale Your Services | AWS re:Invent 2014
Page 42: (DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help Accelerate and Scale Your Services | AWS re:Invent 2014
Page 43: (DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help Accelerate and Scale Your Services | AWS re:Invent 2014

A/B Test

Engine

Personalization

EngineUser Info

Movie

Metadata

Movie

Ratings

Similar

Movies

API

Reviews

Page 44: (DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help Accelerate and Scale Your Services | AWS re:Invent 2014

A/B Test

Engine

Personalization

EngineUser Info

Movie

Metadata

Movie

Ratings

Similar

MoviesReviews

User

Info

API

Page 45: (DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help Accelerate and Scale Your Services | AWS re:Invent 2014

A/B Test

Engine

Personalization

Engine

Movie

Metadata

Movie

Ratings

Similar

MoviesReviews

User

Info

API

Page 46: (DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help Accelerate and Scale Your Services | AWS re:Invent 2014

User

Info

API

A/B Test

Engine

Personalization

Engine

Movie

Metadata

Movie

Ratings

Similar

MoviesReviews

Page 47: (DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help Accelerate and Scale Your Services | AWS re:Invent 2014

A/B Test

Engine

Personalization

Engine

Movie

Metadata

Movie

Ratings

Similar

MoviesReviews

User

Info

API

Page 48: (DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help Accelerate and Scale Your Services | AWS re:Invent 2014
Page 49: (DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help Accelerate and Scale Your Services | AWS re:Invent 2014

User Info

API

A/B Test

Engine

Personalization

Engine

Movie

Metadata

Movie

Ratings

Similar

MoviesReviews

Page 50: (DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help Accelerate and Scale Your Services | AWS re:Invent 2014

A/B Test

Engine

Personalization

Engine

Movie

Metadata

Movie

Ratings

Similar

MoviesReviews

User

Info

API

Page 51: (DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help Accelerate and Scale Your Services | AWS re:Invent 2014

Personaliza

tion Engine

User

Info

Movie

Metadata

Movie

Ratings

Similar

Movies

API

ReviewsA/B Test

Engine

Page 52: (DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help Accelerate and Scale Your Services | AWS re:Invent 2014

Personaliza

tion Engine

User

Info

Movie

Metadata

Movie

Ratings

Similar

Movies

API

ReviewsA/B Test

Engine

Fallback

Page 53: (DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help Accelerate and Scale Your Services | AWS re:Invent 2014

Personaliza

tion Engine

User

Info

Movie

Metadata

Movie

Ratings

Similar

Movies

API

ReviewsA/B Test

Engine

Fallback

Page 54: (DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help Accelerate and Scale Your Services | AWS re:Invent 2014
Page 55: (DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help Accelerate and Scale Your Services | AWS re:Invent 2014
Page 56: (DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help Accelerate and Scale Your Services | AWS re:Invent 2014
Page 57: (DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help Accelerate and Scale Your Services | AWS re:Invent 2014
Page 58: (DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help Accelerate and Scale Your Services | AWS re:Invent 2014

SketchyScumblr

+

Page 59: (DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help Accelerate and Scale Your Services | AWS re:Invent 2014
Page 60: (DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help Accelerate and Scale Your Services | AWS re:Invent 2014

Page 61: (DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help Accelerate and Scale Your Services | AWS re:Invent 2014
Page 62: (DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help Accelerate and Scale Your Services | AWS re:Invent 2014

http://netflix.github.com

Page 63: (DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help Accelerate and Scale Your Services | AWS re:Invent 2014

https://github.com/Answers4AWS/netflixoss-ansible/wiki/AMIs-for-NetflixOSS

http://answersforaws.com/resources/netflixoss/cloudformation/

Page 64: (DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help Accelerate and Scale Your Services | AWS re:Invent 2014

https://github.com/Netflix-Skunkworks/zerotodocker

https://hub.docker.com/u/netflixoss/

Page 65: (DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help Accelerate and Scale Your Services | AWS re:Invent 2014
Page 66: (DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help Accelerate and Scale Your Services | AWS re:Invent 2014

Mac OS X

Virtual Box

Ubuntu 14.04

single kernel

Conta

iner

#1

File

syste

m +

pro

cess

Eure

ka

Conta

iner

Zu

ul

Conta

iner

Anoth

er

Conta

iner

...

Page 67: (DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help Accelerate and Scale Your Services | AWS re:Invent 2014
Page 68: (DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help Accelerate and Scale Your Services | AWS re:Invent 2014
Page 69: (DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help Accelerate and Scale Your Services | AWS re:Invent 2014
Page 70: (DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help Accelerate and Scale Your Services | AWS re:Invent 2014

Talk Time Title

Page 71: (DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help Accelerate and Scale Your Services | AWS re:Invent 2014

http://netflix.github.com

Page 72: (DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help Accelerate and Scale Your Services | AWS re:Invent 2014

@NetflixOSS

http://netflix.github.com

Page 73: (DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help Accelerate and Scale Your Services | AWS re:Invent 2014

Please give us your feedback on this session.

Complete session evaluations and earn re:Invent swag.

http://bit.ly/awsevals