SlideShare a Scribd company logo
1
©	2017		Puneet	Sachdev	|		All	rights	reserved©	2017		Puneet	Sachdev	|		All	rights	reserved
Microservices:	The	Netflix	Way	
21st 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
2
©	2017		Puneet	Sachdev	|		All	rights	reserved©	2017		Puneet	Sachdev	|		All	rights	reserved
3
©	2017		Puneet	Sachdev	|		All	rights	reserved©	2017		Puneet	Sachdev	|		All	rights	reserved
4
©	2017		Puneet	Sachdev	|		All	rights	reserved
Microservices	vs.	SOA	vs.	APIs
Microservices	is	about	
splitting	a	single	
application	into	smaller	
pieces	which	are	
independent	and	have	
their	own	lifecycle
5
©	2017		Puneet	Sachdev	|		All	rights	reserved
Microservices	vs.	SOA	vs.	APIs
CRM DW Finance Loyalty
SOA	is	about	integrating	
different	applications	
which	can	be	internal	or	
3rd party
6
©	2017		Puneet	Sachdev	|		All	rights	reserved
Microservices	vs.	SOA	vs.	APIs
SOA	 Microservices
• Integration	between	different	applications • Splitting	an	application	into	smaller	pieces	
• Dominated	by	proprietary	stacks	 • Dominated	by	Open	Source	components	from	
organizations	like	Netflix	
• Smart	Pipes,	Dumb	Endpoints	 • Dumb	pipes,	Smart	Endpoints	
• Typically	Hub-n-Spoke.	Technology	
Monoliths	
• Completely	Distributed	
APIS
• APIs	are	interfaces	which	are	exposed	either	internally	and/or	externally	and	have	governance	
and	management	around	it
7
©	2017		Puneet	Sachdev	|		All	rights	reserved
Netflix	Microservices	Stack	
Service	Discovery Netflix	Eureka
Netflix	Zipkin
Config Netflix	Archaius
Tracing
Netflix	Zuul
Netflix	RibbonClient	LB
Fault	Tolerance
Proxy
Netflix	Hysterix
Service	Registrar Netflix	Prana
8
©	2017		Puneet	Sachdev	|		All	rights	reserved
Concept	1:	Service	Discovery	through	Netflix	Eureka
Concept	2:	Circuit	Breaker	using	Netflix	Hystrix
• Microservices	applications	have	many	moving	parts	and	span	across	multiple	boundaries
• How	to	prevent	a	network	or	service	failure	from	cascading	to	other	services?
Concept	3:	Real	time	monitoring	using	Netflix	Hystrix	Dashboard
• When	things	fail,	it	is	extremely	important	to	note	what	is	failing
• How	to	monitor	in	near	real	time	many	microservices?
Concept	4:	Load	Balancing	using	Netflix	Ribbon	
• Dumb	pipes	and	smart	endpoints.	Where	does	this	leave	load	balancing?
Concept	5:	Proxying using	Netflix	Zuul
• With	diverse	traffic	hitting	microservices,	how	to	get	an	ability	to	provide	intelligent	filters	on	
requests
• Microservices	applications	run	in	containerized/virtualized	and	cloud	environments	where	their	
actual	locations	change	dynamically	
• How	does	a	client	of	a	service	discover	the	location?
9
©	2017		Puneet	Sachdev	|		All	rights	reserved
Hands On Demo
Download the code from:
https://github.com/psachdev6375/microservices-bootcamp
10
©	2017		Puneet	Sachdev	|		All	rights	reserved
Sentence	Microservices
Subject	
Service
Verb	
Service
Article	
Service
Adjective	
Service
Noun
Service
You saw the leaky seat
Sentence
Service
Download the code from:
https://github.com/psachdev6375/microservices-bootcamp
2 servers
• 192.168.0.4
• 192.168.0.3
11
©	2017		Puneet	Sachdev	|		All	rights	reserved
Sentence	Microservices	– Demo	1
Verb	
Service
Eureka
Verb	
Service	2
1. Start Eureka Server
2. Start Verb Microservice
3. Start Verb2 Microservice
4. Check Eureka console
Download the code from:
https://github.com/psachdev6375/microservices-bootcamp
12
©	2017		Puneet	Sachdev	|		All	rights	reserved
Sentence	Microservices	– Demo	2
Verb	
Service
Eureka
Verb	
Service	2
Sentence
Service
Subject	
Service
Article	
Service
Adjective	
Service
Noun
Service
1. Start Eureka Server
2. Start Verb Microservice
3. Start Verb2 Microservice
4. Check Eureka console
5. Start Sentence Service
6. See Circuit Breaker in action
Download the code from:
https://github.com/psachdev6375/microservices-bootcamp
13
©	2017		Puneet	Sachdev	|		All	rights	reserved
Sentence	Microservices	– Demo	3
Verb	
Service
Eureka
Verb	
Service	2
Sentence
Service
Subject	
Service
Article	
Service
Adjective	
Service
Noun
Service
1. Start Eureka Server
2. Start Verb Microservice
3. Start Verb2 Microservice
4. Check Eureka console
5. Start Sentence Service
6. See Circuit Breaker in action
7. Hystrix Dashboard
Hystrix	
Dashboard
Download the code from:
https://github.com/psachdev6375/microservices-bootcamp
14
©	2017		Puneet	Sachdev	|		All	rights	reserved
Sentence	Microservices	– Demo	4
Verb	
Service
Eureka
Verb	
Service	2
Sentence
Service
Subject	
Service
Article	
Service
Adjective	
Service
Noun
Service
1. Start Eureka Server
2. Start Verb Microservice
3. Start Verb2 Microservice
4. Check Eureka console
5. Start Sentence Service
6. See Circuit Breaker in action
7. Hystrix Dashboard
8. All services running
Hystrix	
Dashboard
Download the code from:
https://github.com/psachdev6375/microservices-bootcamp
15
©	2017		Puneet	Sachdev	|		All	rights	reserved
Sentence	Microservices	– Demo	5
Verb	
Service
Download the code from:
https://github.com/psachdev6375/microservices-bootcamp
Eureka
Verb	
Service	2
Sentence
Service
Subject	
Service
Article	
Service
Adjective	
Service
Noun
Service
Zuul
Hystrix	
Dashboard
1. Start Eureka Server
2. Start Verb Microservice
3. Start Verb2 Microservice
4. Check Eureka console
5. Start Sentence Service
6. See Circuit Breaker in action
7. Hystrix Dashboard
8. All services running
9. Zuul Proxy
16
©	2017		Puneet	Sachdev	|		All	rights	reserved
Thank You
Chief Architect - Agile, DevOps and Product Engineering, NIIT Technologies
https://www.linkedin.com/in/puneetsachdev
Puneet Sachdev

More Related Content

Microservices: The Netflix Way