SlideShare a Scribd company logo
Microservices
By
Subhashish Bhattacharjee
Outline
Intro to Microservices
Microservices Design Principles
Microservices tech stack
Refactoring a Monolithic app to Microservices
Real world example of Microservices
What is a Service?
 A service is a discrete unit of software which basically gives functionality to
other pieces of software within the system. It can be used and updated
independently.
 A service can be reused by different clients, e.g. a mobile & a desktop app.
 Services can be used in conjunction to provide the functionality of a large
software application.
 Services communicate with each other over the network.
Service-Oriented Architecture (SOA)
 It logically represents a business activity with a specified outcome.
 It is self-contained.
 It is a black box for its consumers.
 It may consist of other underlying services.
Source: wikipedia
Monolithic Apps
 Traditional enterprise applications, such as a large e-commerce
website.
 All modules packaged together as a single unit.
 Can be a large service.
 Single executable.
 Shared libraries.
An example of Monolithic app
Source: microservices.io
Limitations of monolithic apps
 Large code base intimidates developers especially ones who are
new to the team
 Lack of agility
 Longer startup time due to large size of the application
 Scaling requires whole application to scale thereby requiring more
computing resources
 Does not fit into DevOps cycles
Definition of microservices
Scope of Microservices
A picture is worth a thousand
words
A Succinct Definition
“Service-oriented architecture”
Composed of
“loosely-coupled components”
Which have
“bounded contexts.”
 By Adrian Cockcroft, VP Cloud Architecture Strategy at AWS (source: Dockercon Europe, 2014)
“do one thing, and do it well”
Each component in the Swiss
army knife does a specific job
Benefits of Microservices
 Independent scaling
• Each microservice can scale independently
 Independent Upgrades
• Each microservice can be deployed independently of other services.
 Ease of maintenance
• Smaller code base focusing on only one thing eases maintenance of code.
 Polyglot
• Developers are free to use the language of their choice for each microservice
independently.
Other benefits
 Fault isolation
• A fault such as memory leak or unclosed database connection is confined to
the particular microservice in question and doesn’t impact the whole system.
 Improved Communication across development teams
• Communication is improved as smaller teams are focused to deliver product
pertaining to a particular business domain.
 Central logging and monitoring
• A central logging system as well as a monitoring system can help analyze
logs for possible issues and also alert the team in case a threshold has been
reached.
 Benefits of embracing CI/CD
• Continuous integration and continuous deployment help in code integration
and deployment in a seamless manner without any manual intervention.
Microservices Design Principles
High Cohesion Autonomous Business Domain-Driven
Resilience Observable Automation
High Cohesion
Accounts
Service
Orders
Service
Products
Service
Inventory
Service
Shipping
Service
 Single focus
 Single Responsibility
Characteristics based on above
two properties:
 Can be easily rewritten
 Scalable
 Flexible
 Reliable
Autonomous
Accounts
Service
Orders
Service
Products
Service
Inventory
Service
Shipping
Service
 Loose Coupling
 Honor common interfaces
 Stateless
 Independently Changeable
 Independently deployable
 Parallel development
Business Domain-Driven
Accounts
Service
Orders
Service
Products
Service
Inventory
Service
Shipping
Service
 Should represent business
function
 Scope of service
 Clearly defined boundaries
 Group related logic together
 Responsive to change in
business domain
Resilience
Accounts
Service
Orders
Service
Products
Service
Inventory
Service
Shipping
Service
 Failure is unavoidable
 Responds well when failure
occurs
 Degrade functionality
 Default functionality
Observable
 Centralized monitoring
• Application health
• Distributed transaction monitoring
 Centralized Logging
• Logs
• Errors
Automation
 Tools to reduce manual testing
 Tools to provide feedback
 Tools to provide automated deployment
Use of Microservices in Cloud
 Easy deployment
 Software isolation with containers
 Easy scaling
 Automated logging
 API Gateway
 Registration and discovery
Microservices Tech Stack
Synchronous Communication
1. Make a call
2. Wait for response
3. Received response
Client
1. Request received
2. Do some work
3. Send response
Server
1. Request response model
2. HTTP
• De facto standard of the web
• Supports serialization of
XML/JSON/Protobuf
3. REST
• CRUD using HTTP verbs
• Open communication protocol
• Decoupled by nature
4. Synchronous communication issues
• Both client and server are to be available
• Performance depends on network
• Client must know the location of server
HTTP
JSON
Asynchronous Communication
 Removes the criteria of client and server availability
 Decouples client and service
 Use of message brokers to send and receive messages by producers and subscribers,
such as RabbitMQ, Kafka etc.
 Architecture becomes complicated.
 Heavy reliance on the message broker for the proper functioning of the system.
 Extra logic for managing the message queue for publishing and consuming messages.
Virtualization
Containers
Registration & Discovery
 Location?
• Host, port, version etc.
 Database for service registration
 Register on startup
 Deregister on failure
 Client side discovery
 Server side discovery
Monitoring
 New Relic
 Nagios
Logging
 Logstash
 Splunk
 Graphite
Scaling
 Vertical scaling
 Horizontal scaling
 Scale application or load balancer automated or on-demand.
 PaaS platforms make scaling a breeze.
API Gateway
 Central entry point
 API gateway provides stronger security
 Dedicated security service
 Centralized security for microservices
Automation tools
 Jenkin
 CircleCI
 Travis
Refactoring a monolith app to
microservices
Monolithic Architecture
Source: microservices.io
Microservice Architecture
Source: microservices.io
Challenges with Microservices
 Being a distributed system has its intrinsic challenges
 Complexity due to many teams and synchronization among teams
 Complexity dealing with asynchronous calls
 Cascading failures
 Discovery and authentication of services
 Integration testing
 Duplication of processes and tools
 Debugging across components
Real World example of Microservices
• Go to www.amazon.com and try to find out as many microservices that you can observe on the home
page.
References
 http://microservices.io
 Microservices Architecture by Rag Dhiman (www.pluralsight.com)
 Building Microservices by Sam Newman
THANK YOU

More Related Content

PDF
Istio : Service Mesh
PDF
Introduction to Istio Service Mesh
PDF
VMware Tanzu Introduction
PPTX
ISTIO Deep Dive
PPTX
Prometheus design and philosophy
PPTX
OpenStack Architecture and Use Cases
PDF
Agile Integration eBook from 2018
PDF
The Sysdig Secure DevOps Platform
Istio : Service Mesh
Introduction to Istio Service Mesh
VMware Tanzu Introduction
ISTIO Deep Dive
Prometheus design and philosophy
OpenStack Architecture and Use Cases
Agile Integration eBook from 2018
The Sysdig Secure DevOps Platform

What's hot (20)

ODP
Istio
PDF
Deploying your first application with Kubernetes
PDF
Kubernetes Concepts And Architecture Powerpoint Presentation Slides
PDF
Putting Firepower Into The Next Generation Firewall
PDF
Ansible Automation Platform.pdf
PDF
Devops - Microservice and Kubernetes
PDF
OpenStack Architecture
PPTX
Istio a service mesh
PPTX
M365 e3 and identity and threat protection and compliance new skus
PDF
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
PDF
Roadmap NodeJS Full Stack 2022.pdf
PPTX
OpenStack Introduction
PPTX
Service mesh
PPTX
Azure cloud governance deck
PDF
What's new in Zimbra Collaboration 8.7.x
PPTX
Using the KVMhypervisor in CloudStack
PPTX
Microservice vs. Monolithic Architecture
PPTX
Hashicorp Vault Open Source vs Enterprise
PPTX
CI/CD with Rancher CLI + Jenkins
PDF
Istio service mesh introduction
Istio
Deploying your first application with Kubernetes
Kubernetes Concepts And Architecture Powerpoint Presentation Slides
Putting Firepower Into The Next Generation Firewall
Ansible Automation Platform.pdf
Devops - Microservice and Kubernetes
OpenStack Architecture
Istio a service mesh
M365 e3 and identity and threat protection and compliance new skus
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
Roadmap NodeJS Full Stack 2022.pdf
OpenStack Introduction
Service mesh
Azure cloud governance deck
What's new in Zimbra Collaboration 8.7.x
Using the KVMhypervisor in CloudStack
Microservice vs. Monolithic Architecture
Hashicorp Vault Open Source vs Enterprise
CI/CD with Rancher CLI + Jenkins
Istio service mesh introduction
Ad

Similar to Microservices-101 (20)

PDF
Understanding Microservices
PDF
Everything you want to know about microservices
PPTX
Microservice intro
PPTX
Microservices
PDF
20141210 - Microservice Container
PPTX
building microservices
PPTX
05 microservices microdeck
PPTX
Microservices.pptx
PDF
Building Microservices Software practics
PPTX
MicroserviceArchitecture in detail over Monolith.
PDF
Microservices in Practice
PDF
Microservices for Application Modernisation
PPTX
An introduction to Microservices
PPTX
Micro Services
PDF
Microservices Interview Questions and Answers PDF By ScholarHat
PPTX
Architecting for speed: How agile innovators accelerate growth through micros...
PPTX
Architecting for speed - how agile innovators accelerate growth through micro...
PDF
Building microservices on azure
PPTX
Microservices, Docker deploy and Microservices source code in C#
PPTX
Microservices and docker
Understanding Microservices
Everything you want to know about microservices
Microservice intro
Microservices
20141210 - Microservice Container
building microservices
05 microservices microdeck
Microservices.pptx
Building Microservices Software practics
MicroserviceArchitecture in detail over Monolith.
Microservices in Practice
Microservices for Application Modernisation
An introduction to Microservices
Micro Services
Microservices Interview Questions and Answers PDF By ScholarHat
Architecting for speed: How agile innovators accelerate growth through micros...
Architecting for speed - how agile innovators accelerate growth through micro...
Building microservices on azure
Microservices, Docker deploy and Microservices source code in C#
Microservices and docker
Ad

Recently uploaded (20)

PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
PTS Company Brochure 2025 (1).pdf.......
PPTX
L1 - Introduction to python Backend.pptx
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PPTX
Materi-Enum-and-Record-Data-Type (1).pptx
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
System and Network Administraation Chapter 3
PPTX
ManageIQ - Sprint 268 Review - Slide Deck
PPT
Introduction Database Management System for Course Database
PPTX
Essential Infomation Tech presentation.pptx
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PDF
Understanding Forklifts - TECH EHS Solution
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PTS Company Brochure 2025 (1).pdf.......
L1 - Introduction to python Backend.pptx
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Materi-Enum-and-Record-Data-Type (1).pptx
How to Migrate SBCGlobal Email to Yahoo Easily
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
How to Choose the Right IT Partner for Your Business in Malaysia
Design an Analysis of Algorithms II-SECS-1021-03
System and Network Administraation Chapter 3
ManageIQ - Sprint 268 Review - Slide Deck
Introduction Database Management System for Course Database
Essential Infomation Tech presentation.pptx
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
Understanding Forklifts - TECH EHS Solution
Upgrade and Innovation Strategies for SAP ERP Customers
Wondershare Filmora 15 Crack With Activation Key [2025

Microservices-101