microservices: the netflix way

16
© 2017 Puneet Sachdev | All rights reserved Microservices: The Netflix Way 21 st April 2017 Hands on Workshop DevOps, Microservices and Containers Summit – Delhi Puneet Sachdev Chief Architect - Agile, DevOps and Product Engineering NIIT Technologies https://www.linkedin.com/in/puneetsachdev

Upload: puneet-sachdev

Post on 22-Jan-2018

386 views

Category:

Software


2 download

TRANSCRIPT

Page 1: Microservices: The Netflix Way

1

©2017PuneetSachdev|Allrightsreserved©2017PuneetSachdev|Allrightsreserved

Microservices:TheNetflixWay

21st April2017

HandsonWorkshop

DevOps,MicroservicesandContainersSummit– Delhi

Puneet Sachdev Chief Architect - Agile, DevOps and Product EngineeringNIIT Technologies https://www.linkedin.com/in/puneetsachdev

Page 2: Microservices: The Netflix Way

2

©2017PuneetSachdev|Allrightsreserved©2017PuneetSachdev|Allrightsreserved

Page 3: Microservices: The Netflix Way

3

©2017PuneetSachdev|Allrightsreserved©2017PuneetSachdev|Allrightsreserved

Page 4: Microservices: The Netflix Way

4

©2017PuneetSachdev|Allrightsreserved

Microservicesvs.SOAvs.APIs

Microservicesisaboutsplittingasingle

applicationintosmallerpieceswhichare

independentandhavetheirownlifecycle

Page 5: Microservices: The Netflix Way

5

©2017PuneetSachdev|Allrightsreserved

Microservicesvs.SOAvs.APIs

CRM DW Finance Loyalty

SOAisaboutintegratingdifferentapplications

whichcanbeinternalor3rd party

Page 6: Microservices: The Netflix Way

6

©2017PuneetSachdev|Allrightsreserved

Microservicesvs.SOAvs.APIsSOA Microservices

• Integrationbetweendifferentapplications • Splittinganapplicationintosmallerpieces

• Dominatedbyproprietarystacks • DominatedbyOpenSourcecomponentsfromorganizationslikeNetflix

• SmartPipes,DumbEndpoints • Dumbpipes,SmartEndpoints

• TypicallyHub-n-Spoke.TechnologyMonoliths

• CompletelyDistributed

APIS

• APIsareinterfaceswhichareexposedeitherinternallyand/orexternallyandhavegovernanceandmanagementaroundit

Page 7: Microservices: The Netflix Way

7

©2017PuneetSachdev|Allrightsreserved

NetflixMicroservicesStack

ServiceDiscovery NetflixEureka

NetflixZipkin

Config NetflixArchaius

Tracing

NetflixZuul

NetflixRibbonClientLB

FaultTolerance

Proxy

NetflixHysterix

ServiceRegistrar NetflixPrana

Page 8: Microservices: The Netflix Way

8

©2017PuneetSachdev|Allrightsreserved

Concept1:ServiceDiscoverythroughNetflixEureka

Concept2:CircuitBreakerusingNetflixHystrix• Microservicesapplicationshavemanymovingpartsandspanacrossmultipleboundaries

• Howtopreventanetworkorservicefailurefromcascadingtootherservices?

Concept3:RealtimemonitoringusingNetflixHystrixDashboard• Whenthingsfail,itisextremelyimportanttonotewhatisfailing

• Howtomonitorinnearrealtimemanymicroservices?

Concept4:LoadBalancingusingNetflixRibbon

• Dumbpipesandsmartendpoints.Wheredoesthisleaveloadbalancing?

Concept5:Proxying usingNetflixZuul• Withdiversetraffichittingmicroservices,howtogetanabilitytoprovideintelligentfilterson

requests

• Microservicesapplicationsrunincontainerized/virtualizedandcloudenvironmentswheretheiractuallocationschangedynamically

• Howdoesaclientofaservicediscoverthelocation?

Page 9: Microservices: The Netflix Way

9

©2017PuneetSachdev|Allrightsreserved

Hands On Demo

Download the code from: https://github.com/psachdev6375/microservices-bootcamp

Page 10: Microservices: The Netflix Way

10

©2017PuneetSachdev|Allrightsreserved

SentenceMicroservices

SubjectService

VerbService

ArticleService

AdjectiveService

NounService

You saw the leaky seat

SentenceService

Download the code from: https://github.com/psachdev6375/microservices-bootcamp

2 servers • 192.168.0.4• 192.168.0.3

Page 11: Microservices: The Netflix Way

11

©2017PuneetSachdev|Allrightsreserved

SentenceMicroservices– Demo1

VerbService

Eureka

VerbService2

1. Start Eureka Server 2. Start Verb Microservice3. Start Verb2 Microservice4. Check Eureka console

Download the code from: https://github.com/psachdev6375/microservices-bootcamp

Page 12: Microservices: The Netflix Way

12

©2017PuneetSachdev|Allrightsreserved

SentenceMicroservices– Demo2

VerbService

Eureka

VerbService2

SentenceService

SubjectService

ArticleService

AdjectiveService

NounService

1. Start Eureka Server 2. Start Verb Microservice3. Start Verb2 Microservice4. Check Eureka console5. Start Sentence Service 6. See Circuit Breaker in action

Download the code from: https://github.com/psachdev6375/microservices-bootcamp

Page 13: Microservices: The Netflix Way

13

©2017PuneetSachdev|Allrightsreserved

SentenceMicroservices– Demo3

VerbService

Eureka

VerbService2

SentenceService

SubjectService

ArticleService

AdjectiveService

NounService

1. Start Eureka Server 2. Start Verb Microservice3. Start Verb2 Microservice4. Check Eureka console5. Start Sentence Service 6. See Circuit Breaker in action7. Hystrix Dashboard

HystrixDashboard

Download the code from: https://github.com/psachdev6375/microservices-bootcamp

Page 14: Microservices: The Netflix Way

14

©2017PuneetSachdev|Allrightsreserved

SentenceMicroservices– Demo4

VerbService

Eureka

VerbService2

SentenceService

SubjectService

ArticleService

AdjectiveService

NounService

1. Start Eureka Server 2. Start Verb Microservice3. Start Verb2 Microservice4. Check Eureka console5. Start Sentence Service 6. See Circuit Breaker in action7. Hystrix Dashboard8. All services running

HystrixDashboard

Download the code from: https://github.com/psachdev6375/microservices-bootcamp

Page 15: Microservices: The Netflix Way

15

©2017PuneetSachdev|Allrightsreserved

SentenceMicroservices– Demo5

VerbService

Download the code from: https://github.com/psachdev6375/microservices-bootcamp

Eureka

VerbService2

SentenceService

SubjectService

ArticleService

AdjectiveService

NounService

Zuul

HystrixDashboard

1. Start Eureka Server 2. Start Verb Microservice3. Start Verb2 Microservice4. Check Eureka console5. Start Sentence Service 6. See Circuit Breaker in action7. Hystrix Dashboard8. All services running9. Zuul Proxy

Page 16: Microservices: The Netflix Way

16

©2017PuneetSachdev|Allrightsreserved

Thank You

Chief Architect - Agile, DevOps and Product Engineering, NIIT Technologies https://www.linkedin.com/in/puneetsachdev

Puneet Sachdev