Mukul	Jain
Head	of	Xpirit	India
XEBIA
Something	Interesting	is	Happening	…..
Digital	Disruption	is	Better	and	Faster
Speed	Up	and	Scale	Up
Technology	Evolution
Microservices ==				SOA	Done	Right		==			Scalability?
App	1
Traditional	approach Microservices	approach
• A	micro	service	application	
separates	functionality	into	
separate	smaller	services.
• A	monolithic	application	has	most	
of	its	functionality	within	a	few	
processes.
• Scales	by	cloning	the	app	on	
multiple	servers	/	VMs	/	Containers
• Scales	by	deploying	each	service	
independently	creating	instances	of	these	
services	across	servers/VMs/containers
App	1 App	2
• Single	monolithic	database
• Tiers	of	specific	technologies
State	in	Traditional	approach State	in	Microservices	approach
• Graph	of	interconnected	microservices
• State	typically	scoped	to	the	microservice
• Variety	of	technologies	used	
• Remote	Storage	for	cold	data
stateless	services	with	
separate	stores
stateful
services
stateless	
presentation	
services
stateless	
services
What	is	Microservice?
Autonomous	Service	
Contain	code	plus	state
Interact	with	other	microservices over	well	defined	interfaces
Remain	Consistent	and	Available	in	the	presence	of	Failures
• Autonomy
• High	cohesion
• Low	coupling
Developer	Dependencies
For a monolith to change,
all must agree on each
change. Each change has
unanticipated effects
requiring careful testing
beforehand.
Developers can create and
activate new microservices
without prior coordination with
others. Their adherence to MSA
principles makes continuous
delivery of new or modified
services possible.
Elements in SOA are
developed more autonomously
but must be coordinated with
others to fit into the overall
design.
Microservice
Benefits
Any	
Language	and	
framework
Resilience	
against	
failure
Selective	
scaling
Deployment	
of	smaller	
pieces	with	
lower	risk
Alignment	
with	
Organization
• Small	Focused	
Teams
Improved	
Resource	
Utilization	to	
reduce	cost
Fault	
Isolation
Servers	
Treated	as	
cattle,	not	
pets
Service	FabricHigh	Availability
Hyper-Scale
Hybrid	Operations
High	Density
Microservices
Rolling	Upgrades
Stateful	Services
Low	Latency
Fast	Startup	&	
Shutdown
Code	Orchestration	&	
Lifecycle	Management
Replication	&	FailoverSimple	
programming	
models
Resource	Management
Self-healingData	Partitioning
Automated	Rollback
Health	Monitoring
Placement	
Constraints
Azure Private	cloud Other	clouds
Azure	Cloud	Services	
(Web	and	Worker	Roles)
Azure	Service	Fabric
(Stateless,	stateful or	Actor	services)
• 1	role	instance	per	VM
• Uneven	utilization
• Slow	deployment	&	upgrade	(bound	to	VM)
• Slow	scaling	and	failure	recovery
• Many	microservices	per	VM
• Even	Utilization	(by	default,	customizable)
• Fast	deployment	&	upgrade
• Fast	scaling	of	independent	microservices
Windows	OS
Windows	OS Windows	OS
Windows	OS
Windows	OS
Windows	OS
Fabric
Node
Fabric
Node	
Fabric
Node
Fabric
Node
Fabric
Node
Fabric
Node
Linux	Support
Java	Support
On	Premises	Clusters
App1 App2
App	Type	Packages Service	Fabric	Cluster	VMs
Handling	Machine	Failures
App1 App2
App	Type	Packages Service	Fabric	Cluster	VMs
Handling	Machine	Failures
Stateful	Microservices	- Replication
Primary
Secondary
Replication
Service	Fabric	Cluster	VMs
Windows	OS
Windows	OS Windows	OS
Windows	OS
Windows	OS
Windows	OS
Fabric
Node
Fabric
Node	
Fabric
Node
Fabric
Node
Fabric
Node
Fabric
Node
App	B	v2
App	B	v2
App	B	v2
App	A	v1
App	A	v1
App	A	v1
App	C	v1
App	C	v1
App	C	v1
App	Repository
App	A	v1
App	C	v1
App	B	v2
App	C	v2
App	C	v2
App	C	v2
App	C	v2
Node	5Node	4Node	3 Node	6Node	2Node	1
P2
S
S
S
P4
S
P1
S
P3S
S
S
• Services	can	be	partitioned	for	scale-out.
• You	can	choose	your	own	partitioning	scheme.
• Replicas	automatically	scale	out	&	in	on	cluster	changes
Performance	and	stress	response
•Rich	built-in	metrics	for	Actors	and	Services	programming	models
•Easy	to	add	custom	application	performance	metrics
Health	status	monitoring
•Built-in	health	status	for	cluster	and	services
•Flexible	and	extensible	health	store	for	custom	app	health	reporting
•Allows	continuous	monitoring	for	real-time	alerting	on	problems	in	
production
Services	built	with	Service	Fabric
:	Speed	Up	and	Scale	UpTakeaways
Microservices to Scale using Azure Service Fabric

Microservices to Scale using Azure Service Fabric