SlideShare a Scribd company logo
©2017 GlobalLogic Inc.
Building microServices
Yuriy Chapran
©2017 GlobalLogic Inc.
Monolith
What are microservies ?
Design approaches used with microservices
Questions
01
02
03
04
©2017 GlobalLogic Inc.
How will you write service application ?
Section Title
− One or many processes ?
− Database or standalone file ?
− How will they all communicate ?
− How will you upgrade ?
− What if maximum amount of
users will triple in first week ?
− And grow ten times in a month ?
©2017 GlobalLogic Inc.
Monolith01
©2017 GlobalLogic Inc.
Characteristics and Benefits
Monolith
Section Title
− One build and deployment unit
− One code base
− One technology stack
−Simple mental model for
developers
−Simple scaling model for
operations - run multiple copies
behind a load balancer
©2017 GlobalLogic Inc.
Problems
Monolith
Section Title
− Huge and intimidating code base
for developers
−Development tools get
overburdened
−Scaling is limited
−Deployment frequency is limited
©2017 GlobalLogic Inc.
Characteristics and Benefits
Layered systems
Section Title
− A layered system decomposes a
monolith into layers, usually:
presentation, logic, data access
− At most one technology stack per
layer
− Simple mental model, simple
dependencies
− Simple deployment and scaling
model
©2017 GlobalLogic Inc.
Problems
Layered systems
Section Title
− Still huge codebases (one per
layer)
−Scaling works better, but still
limited
−Staff growth is limited: roughly
speaking, one team per layer
works well
©2017 GlobalLogic Inc.
What are microservies ?02
©2017 GlobalLogic Inc.
History
Section Title
−2011: First discussions using this term
at a software architecture workshop
near Venice
−May 2012: microservices settled as
the most appropriate term
−March 2012: “Java, the Unix Way” at
33rd degree by James Lewis
−September 2012: “µService
Architecture“ at Baruco by Fred George
−All along, Adrian Cockroft pioneered
this style at Netflix as “fine grained
SOA”
©2017 GlobalLogic Inc.
Section Title
What are Microservices ?
Microservices are small, autonomous services
that work together.
©2017 GlobalLogic Inc.
Small with a single responsibility
Section Title
−Each application does only one
thing
−Small enough to fit in your head
−Small enough that you can throw
them away
−Rewrite over Maintain
©2017 GlobalLogic Inc.
Autonomous
Section Title
−Embedded container or package (deb or
rpm etc.)
−Packaged as a single executable
−Along with their configuration files
−And unix standard rc.d scripts
−Installed separately
−Communicating with other services over
network, uses and exposes versioned API
−No DB or files shared between two
services
©2017 GlobalLogic Inc.
Located in different SVC roots
Section Title
−Each application is completely
separate
−Domains in different bounded
contexts should be distinct – and it's
ok to have duplication – Use
physical separation to enforce this
−There will be common code, but it
should be library and infrastructure
code – treat it as you would any
other open source library
©2017 GlobalLogic Inc.
Microservices provide benefits…
Tradeoffs
Section Title
− Strong Module Boundaries: Microservices
reinforce modular structure, which is
particularly important for larger teams.
− Independent Deployment: Simple services
are easier to deploy, and since they are
autonomous, are less likely to cause
system failures when they go wrong.
− Technology Diversity: With microservices
you can mix multiple languages,
development frameworks and data-storage
technologies.
…but come with costs
− Distribution: Distributed systems are
harder to program, since remote calls are
slow and are always at risk of failure.
− Eventual Consistency: Maintaining strong
consistency is extremely difficult for a
distributed system, which means everyone
has to manage eventual consistency.
− Operational Complexity: You need a
mature operations team to manage lots of
services, which are being redeployed
regularly.
https://martinfowler.com/articles/microservice-trade-offs.html
©2017 GlobalLogic Inc.
Service-oriented architecture (SOA)
Section Title
©2017 GlobalLogic Inc.
Design approaches used with microservices03
©2017 GlobalLogic Inc.
Business microservice
Section Title
− Design the application with a set
of modules where each is an
independent business function
with its own data, developed by a
separate team and deployed in a
separate process
©2017 GlobalLogic Inc.
API gateway
Section Title
− Exposes system API to outer
world - single entry point
− Has no business logic!
− Requests required information
from specific microservices
− Can perform protocol translation
− Must be highly available
©2017 GlobalLogic Inc.
Load balancers and Message queues
Section Title
−Decoupled and
asynchronous using of
messaging/events to remove
peer-to-peer dependencies
−Using Message Broker
pattern
−RabbitMQ, ZeroMQ
©2017 GlobalLogic Inc.
Results cache
Section Title
−Some services, when called
repeatedly, return the same
data every time and don’t
cause any side effects
−Results Cache can be as
simple as a Key-Value Store
−Set lifetime limit for cache,
from few seconds to few
hours
©2017 GlobalLogic Inc.
Circuit breaker
Section Title
©2017 GlobalLogic Inc.
Service registry + self registration + 3rd party
registration + configuration as a service
Section Title
−Knows about all running
services - physical IP
address and service type
−Gathers services health
information, like status,
uptime
−Can gather and aggregate
some microservices metrics
©2017 GlobalLogic Inc.
Favour choreography over orchestration
Section Title
©2017 GlobalLogic Inc.
Adapter microservice
Section Title
− Converts existing service’s non
microservice API to an API that
client microservice will expect.
− One of the first steps on
migrating from Monolith to
microServices
©2017 GlobalLogic Inc.
Log aggregator
Section Title
©2017 GlobalLogic Inc.
Correlation ID
Section Title
− How do you debug a complex call
graph when you do not know
where in the set of microservices
along that call graph the problem
may have been introduced?
−Simple identifier (usually just a
number)
−Passed into every service
request
−Is printed in the every log entry
related to the request
©2017 GlobalLogic Inc.
Health Check API
Section Title
− How to detect that a running
service instance is unable to
handle requests?
−An alert should be generated
when a service instance fails
−Requests should be routed to
working service instances
− A service has an health check
API endpoint that returns the
health of the service
©2017 GlobalLogic Inc.
Section Title
− You need to know when and where to
scale up or down
− Bould with Load balancer and Service
registry
− Aggregating monitors with alers
− Good, thought through metrics
− processing rate - amount of processed
req/sec
− amount of succeeded and failed requests
− length of requests queue - min, max, latest
− connections status
Application metrics
©2017 GlobalLogic Inc.
Infrastructure automation - CI/CD
Section Title
©2017 GlobalLogic Inc.
Still there are much more ...
Section Title
©2017 GlobalLogic Inc.
Summary04
©2017 GlobalLogic Inc.
Section Title
©2017 GlobalLogic Inc.
This is cool
Section Title
−We haven’t even talked about
−Versioning
−Integration
−Testing
−Deployment
−Security
−Anti-patterns
−Nanoservices
−Data driven migration
−...
©2017 GlobalLogic Inc.
Section Title
©2017 GlobalLogic Inc.
Literature
Section Title
©2017 GlobalLogic Inc.
Questions06
©2017 GlobalLogic Inc.
Contact Info
Thank You
©2017 GlobalLogic Inc.
Literature
Section Title
− http://2012.33degree.org/pdf/JamesLewisMicroServices.pdf
− http://www.braveterry.com/2014/04/10/presentation-service-architecture/
− http://www.pst.ifi.lmu.de/Lehre/wise-14-15/mse/microservice-architectures.pdf
− https://martinfowler.com/microservices/
− http://nealford.com/downloads/Building_Microservice_Architectures_Neal_Ford.pdf
− https://www.nginx.com/wp-content/uploads/2015/01/Building_Microservices_Nginx.pdf
− http://transform.ca.com/API-microservice-architecture-oreilly-book.html
− https://www.amazon.com/Microservices-Discover-Manage-Architecture/dp/151939733X
− https://www.openshift.com/promotions/microservices.html
− http://microservices.io
− http://www.vinaysahni.com/best-practices-for-building-a-microservice-architecture

More Related Content

What's hot

Patterns of evolution from monolith to microservices
Patterns of evolution from monolith to microservicesPatterns of evolution from monolith to microservices
Patterns of evolution from monolith to microservices
Karina Mora
 
What’s New with NGINX Controller Load Balancing Module 2.0?
What’s New with NGINX Controller Load Balancing Module 2.0?What’s New with NGINX Controller Load Balancing Module 2.0?
What’s New with NGINX Controller Load Balancing Module 2.0?
NGINX, Inc.
 
Deploying NGINX in Cloud Native Kubernetes
Deploying NGINX in Cloud Native KubernetesDeploying NGINX in Cloud Native Kubernetes
Deploying NGINX in Cloud Native Kubernetes
Kangaroot
 
Microservices Architecture - Bangkok 2018
Microservices Architecture - Bangkok 2018Microservices Architecture - Bangkok 2018
Microservices Architecture - Bangkok 2018
Araf Karsh Hamid
 
Microservices in Action
Microservices in ActionMicroservices in Action
Microservices in Action
Bhagwat Kumar
 
Blockchain on the oracle cloud, the next big thing
Blockchain on the oracle cloud, the next big thingBlockchain on the oracle cloud, the next big thing
Blockchain on the oracle cloud, the next big thing
Robert van Mölken
 
Comparison of Current Service Mesh Architectures
Comparison of Current Service Mesh ArchitecturesComparison of Current Service Mesh Architectures
Comparison of Current Service Mesh Architectures
Mirantis
 
Microservices Architecture
Microservices ArchitectureMicroservices Architecture
Microservices Architecture
Srinivasan Nanduri
 
Kubernetes solutions
Kubernetes solutionsKubernetes solutions
Kubernetes solutions
Eric Cattoir
 
Orchestraing the Blockchain Using Containers
Orchestraing the Blockchain Using ContainersOrchestraing the Blockchain Using Containers
Orchestraing the Blockchain Using Containers
Andrew Kennedy
 
Why OpenDaylight
Why OpenDaylightWhy OpenDaylight
Why OpenDaylight
Lumina Networks
 
Deep-dive into APIs in a Microservice Architecture
Deep-dive into APIs in a Microservice ArchitectureDeep-dive into APIs in a Microservice Architecture
Deep-dive into APIs in a Microservice Architecture
WSO2
 
CWIN17 london becoming cloud native part 2 - guy martin docker
CWIN17 london   becoming cloud native part 2 - guy martin dockerCWIN17 london   becoming cloud native part 2 - guy martin docker
CWIN17 london becoming cloud native part 2 - guy martin docker
Capgemini
 
Oracle Blockchain Cloud Service
Oracle Blockchain Cloud ServiceOracle Blockchain Cloud Service
Oracle Blockchain Cloud Service
Monte Kluemper
 
Connecting All Abstractions with Istio
Connecting All Abstractions with IstioConnecting All Abstractions with Istio
Connecting All Abstractions with Istio
VMware Tanzu
 
Making Microservices Smarter with Istio, Envoy and Pivotal Ingress Router
Making Microservices Smarter with Istio, Envoy and Pivotal Ingress RouterMaking Microservices Smarter with Istio, Envoy and Pivotal Ingress Router
Making Microservices Smarter with Istio, Envoy and Pivotal Ingress Router
VMware Tanzu
 
Developing applications with a microservice architecture (SVforum, microservi...
Developing applications with a microservice architecture (SVforum, microservi...Developing applications with a microservice architecture (SVforum, microservi...
Developing applications with a microservice architecture (SVforum, microservi...
Chris Richardson
 
Innovation with Open Sources and App Modernization for Developers | Ian Y. Choi
Innovation with Open Sources and App Modernization for Developers | Ian Y. ChoiInnovation with Open Sources and App Modernization for Developers | Ian Y. Choi
Innovation with Open Sources and App Modernization for Developers | Ian Y. Choi
Vietnam Open Infrastructure User Group
 
Nats meetup sf 20150826
Nats meetup sf   20150826Nats meetup sf   20150826
Nats meetup sf 20150826
Apcera
 
Building a scalable microservice architecture with envoy, kubernetes and istio
Building a scalable microservice architecture with envoy, kubernetes and istioBuilding a scalable microservice architecture with envoy, kubernetes and istio
Building a scalable microservice architecture with envoy, kubernetes and istio
SAMIR BEHARA
 

What's hot (20)

Patterns of evolution from monolith to microservices
Patterns of evolution from monolith to microservicesPatterns of evolution from monolith to microservices
Patterns of evolution from monolith to microservices
 
What’s New with NGINX Controller Load Balancing Module 2.0?
What’s New with NGINX Controller Load Balancing Module 2.0?What’s New with NGINX Controller Load Balancing Module 2.0?
What’s New with NGINX Controller Load Balancing Module 2.0?
 
Deploying NGINX in Cloud Native Kubernetes
Deploying NGINX in Cloud Native KubernetesDeploying NGINX in Cloud Native Kubernetes
Deploying NGINX in Cloud Native Kubernetes
 
Microservices Architecture - Bangkok 2018
Microservices Architecture - Bangkok 2018Microservices Architecture - Bangkok 2018
Microservices Architecture - Bangkok 2018
 
Microservices in Action
Microservices in ActionMicroservices in Action
Microservices in Action
 
Blockchain on the oracle cloud, the next big thing
Blockchain on the oracle cloud, the next big thingBlockchain on the oracle cloud, the next big thing
Blockchain on the oracle cloud, the next big thing
 
Comparison of Current Service Mesh Architectures
Comparison of Current Service Mesh ArchitecturesComparison of Current Service Mesh Architectures
Comparison of Current Service Mesh Architectures
 
Microservices Architecture
Microservices ArchitectureMicroservices Architecture
Microservices Architecture
 
Kubernetes solutions
Kubernetes solutionsKubernetes solutions
Kubernetes solutions
 
Orchestraing the Blockchain Using Containers
Orchestraing the Blockchain Using ContainersOrchestraing the Blockchain Using Containers
Orchestraing the Blockchain Using Containers
 
Why OpenDaylight
Why OpenDaylightWhy OpenDaylight
Why OpenDaylight
 
Deep-dive into APIs in a Microservice Architecture
Deep-dive into APIs in a Microservice ArchitectureDeep-dive into APIs in a Microservice Architecture
Deep-dive into APIs in a Microservice Architecture
 
CWIN17 london becoming cloud native part 2 - guy martin docker
CWIN17 london   becoming cloud native part 2 - guy martin dockerCWIN17 london   becoming cloud native part 2 - guy martin docker
CWIN17 london becoming cloud native part 2 - guy martin docker
 
Oracle Blockchain Cloud Service
Oracle Blockchain Cloud ServiceOracle Blockchain Cloud Service
Oracle Blockchain Cloud Service
 
Connecting All Abstractions with Istio
Connecting All Abstractions with IstioConnecting All Abstractions with Istio
Connecting All Abstractions with Istio
 
Making Microservices Smarter with Istio, Envoy and Pivotal Ingress Router
Making Microservices Smarter with Istio, Envoy and Pivotal Ingress RouterMaking Microservices Smarter with Istio, Envoy and Pivotal Ingress Router
Making Microservices Smarter with Istio, Envoy and Pivotal Ingress Router
 
Developing applications with a microservice architecture (SVforum, microservi...
Developing applications with a microservice architecture (SVforum, microservi...Developing applications with a microservice architecture (SVforum, microservi...
Developing applications with a microservice architecture (SVforum, microservi...
 
Innovation with Open Sources and App Modernization for Developers | Ian Y. Choi
Innovation with Open Sources and App Modernization for Developers | Ian Y. ChoiInnovation with Open Sources and App Modernization for Developers | Ian Y. Choi
Innovation with Open Sources and App Modernization for Developers | Ian Y. Choi
 
Nats meetup sf 20150826
Nats meetup sf   20150826Nats meetup sf   20150826
Nats meetup sf 20150826
 
Building a scalable microservice architecture with envoy, kubernetes and istio
Building a scalable microservice architecture with envoy, kubernetes and istioBuilding a scalable microservice architecture with envoy, kubernetes and istio
Building a scalable microservice architecture with envoy, kubernetes and istio
 

Similar to Yuriy Chapran - Building microservices.

Microservice Pattern Launguage
Microservice Pattern LaunguageMicroservice Pattern Launguage
Microservice Pattern Launguage
Inho Kang
 
NUS-ISS Learning Day 2018- Designing software to make the most of cloud platf...
NUS-ISS Learning Day 2018- Designing software to make the most of cloud platf...NUS-ISS Learning Day 2018- Designing software to make the most of cloud platf...
NUS-ISS Learning Day 2018- Designing software to make the most of cloud platf...
NUS-ISS
 
CWIN17 Utrecht / cg u services - frank van der wal
CWIN17 Utrecht / cg u services - frank van der walCWIN17 Utrecht / cg u services - frank van der wal
CWIN17 Utrecht / cg u services - frank van der wal
Capgemini
 
PaaS Lessons: Cisco IT Deploys OpenShift to Meet Developer Demand
PaaS Lessons: Cisco IT Deploys OpenShift to Meet Developer DemandPaaS Lessons: Cisco IT Deploys OpenShift to Meet Developer Demand
PaaS Lessons: Cisco IT Deploys OpenShift to Meet Developer Demand
Cisco IT
 
Over view of software artitecture
Over view of software artitectureOver view of software artitecture
Over view of software artitecture
ABDEL RAHMAN KARIM
 
All-inclusive insights on Building JavaScript microservices with Node!.pdf
All-inclusive insights on Building JavaScript microservices with Node!.pdfAll-inclusive insights on Building JavaScript microservices with Node!.pdf
All-inclusive insights on Building JavaScript microservices with Node!.pdf
Shelly Megan
 
12월 16일 Meetup [Deep Dive] Microservice 트래픽 관리를 위한 Istio 알아보기 | 강인호 컨설턴트, 오라클
12월 16일 Meetup [Deep Dive] Microservice 트래픽 관리를 위한 Istio 알아보기 | 강인호 컨설턴트, 오라클12월 16일 Meetup [Deep Dive] Microservice 트래픽 관리를 위한 Istio 알아보기 | 강인호 컨설턴트, 오라클
12월 16일 Meetup [Deep Dive] Microservice 트래픽 관리를 위한 Istio 알아보기 | 강인호 컨설턴트, 오라클
Oracle Korea
 
The elegant way of implementing microservices with istio
The elegant way of implementing microservices with istioThe elegant way of implementing microservices with istio
The elegant way of implementing microservices with istio
Inho Kang
 
Technology insights: Decision Science Platform
Technology insights: Decision Science PlatformTechnology insights: Decision Science Platform
Technology insights: Decision Science Platform
Decision Science Community
 
Adopting the Cloud
Adopting the CloudAdopting the Cloud
Adopting the Cloud
Tapio Rautonen
 
MuleSoft Manchester Meetup #4 slides 11th February 2021
MuleSoft Manchester Meetup #4 slides 11th February 2021MuleSoft Manchester Meetup #4 slides 11th February 2021
MuleSoft Manchester Meetup #4 slides 11th February 2021
Ieva Navickaite
 
AppDev with Microservices
AppDev with MicroservicesAppDev with Microservices
AppDev with Microservices
Rishabh Dugar
 
Microservices Architecture & Testing Strategies
Microservices Architecture & Testing StrategiesMicroservices Architecture & Testing Strategies
Microservices Architecture & Testing Strategies
Araf Karsh Hamid
 
Cloudify your applications: microservices and beyond
Cloudify your applications: microservices and beyondCloudify your applications: microservices and beyond
Cloudify your applications: microservices and beyond
Ugo Landini
 
MicroserviceArchitecture in detail over Monolith.
MicroserviceArchitecture in detail over Monolith.MicroserviceArchitecture in detail over Monolith.
MicroserviceArchitecture in detail over Monolith.
PLovababu
 
Microservices in Practice
Microservices in PracticeMicroservices in Practice
Microservices in Practice
Kasun Indrasiri
 
Cloud-Native Patterns and the Benefits of MySQL as a Platform Managed Service
Cloud-Native Patterns and the Benefits of MySQL as a Platform Managed ServiceCloud-Native Patterns and the Benefits of MySQL as a Platform Managed Service
Cloud-Native Patterns and the Benefits of MySQL as a Platform Managed Service
VMware Tanzu
 
Microservices + Oracle: A Bright Future
Microservices + Oracle: A Bright FutureMicroservices + Oracle: A Bright Future
Microservices + Oracle: A Bright Future
Kelly Goetsch
 
How to Migrate Applications Off a Mainframe
How to Migrate Applications Off a MainframeHow to Migrate Applications Off a Mainframe
How to Migrate Applications Off a Mainframe
VMware Tanzu
 
[WSO2Con EU 2017] Microservices for Enterprises
[WSO2Con EU 2017] Microservices for Enterprises[WSO2Con EU 2017] Microservices for Enterprises
[WSO2Con EU 2017] Microservices for Enterprises
WSO2
 

Similar to Yuriy Chapran - Building microservices. (20)

Microservice Pattern Launguage
Microservice Pattern LaunguageMicroservice Pattern Launguage
Microservice Pattern Launguage
 
NUS-ISS Learning Day 2018- Designing software to make the most of cloud platf...
NUS-ISS Learning Day 2018- Designing software to make the most of cloud platf...NUS-ISS Learning Day 2018- Designing software to make the most of cloud platf...
NUS-ISS Learning Day 2018- Designing software to make the most of cloud platf...
 
CWIN17 Utrecht / cg u services - frank van der wal
CWIN17 Utrecht / cg u services - frank van der walCWIN17 Utrecht / cg u services - frank van der wal
CWIN17 Utrecht / cg u services - frank van der wal
 
PaaS Lessons: Cisco IT Deploys OpenShift to Meet Developer Demand
PaaS Lessons: Cisco IT Deploys OpenShift to Meet Developer DemandPaaS Lessons: Cisco IT Deploys OpenShift to Meet Developer Demand
PaaS Lessons: Cisco IT Deploys OpenShift to Meet Developer Demand
 
Over view of software artitecture
Over view of software artitectureOver view of software artitecture
Over view of software artitecture
 
All-inclusive insights on Building JavaScript microservices with Node!.pdf
All-inclusive insights on Building JavaScript microservices with Node!.pdfAll-inclusive insights on Building JavaScript microservices with Node!.pdf
All-inclusive insights on Building JavaScript microservices with Node!.pdf
 
12월 16일 Meetup [Deep Dive] Microservice 트래픽 관리를 위한 Istio 알아보기 | 강인호 컨설턴트, 오라클
12월 16일 Meetup [Deep Dive] Microservice 트래픽 관리를 위한 Istio 알아보기 | 강인호 컨설턴트, 오라클12월 16일 Meetup [Deep Dive] Microservice 트래픽 관리를 위한 Istio 알아보기 | 강인호 컨설턴트, 오라클
12월 16일 Meetup [Deep Dive] Microservice 트래픽 관리를 위한 Istio 알아보기 | 강인호 컨설턴트, 오라클
 
The elegant way of implementing microservices with istio
The elegant way of implementing microservices with istioThe elegant way of implementing microservices with istio
The elegant way of implementing microservices with istio
 
Technology insights: Decision Science Platform
Technology insights: Decision Science PlatformTechnology insights: Decision Science Platform
Technology insights: Decision Science Platform
 
Adopting the Cloud
Adopting the CloudAdopting the Cloud
Adopting the Cloud
 
MuleSoft Manchester Meetup #4 slides 11th February 2021
MuleSoft Manchester Meetup #4 slides 11th February 2021MuleSoft Manchester Meetup #4 slides 11th February 2021
MuleSoft Manchester Meetup #4 slides 11th February 2021
 
AppDev with Microservices
AppDev with MicroservicesAppDev with Microservices
AppDev with Microservices
 
Microservices Architecture & Testing Strategies
Microservices Architecture & Testing StrategiesMicroservices Architecture & Testing Strategies
Microservices Architecture & Testing Strategies
 
Cloudify your applications: microservices and beyond
Cloudify your applications: microservices and beyondCloudify your applications: microservices and beyond
Cloudify your applications: microservices and beyond
 
MicroserviceArchitecture in detail over Monolith.
MicroserviceArchitecture in detail over Monolith.MicroserviceArchitecture in detail over Monolith.
MicroserviceArchitecture in detail over Monolith.
 
Microservices in Practice
Microservices in PracticeMicroservices in Practice
Microservices in Practice
 
Cloud-Native Patterns and the Benefits of MySQL as a Platform Managed Service
Cloud-Native Patterns and the Benefits of MySQL as a Platform Managed ServiceCloud-Native Patterns and the Benefits of MySQL as a Platform Managed Service
Cloud-Native Patterns and the Benefits of MySQL as a Platform Managed Service
 
Microservices + Oracle: A Bright Future
Microservices + Oracle: A Bright FutureMicroservices + Oracle: A Bright Future
Microservices + Oracle: A Bright Future
 
How to Migrate Applications Off a Mainframe
How to Migrate Applications Off a MainframeHow to Migrate Applications Off a Mainframe
How to Migrate Applications Off a Mainframe
 
[WSO2Con EU 2017] Microservices for Enterprises
[WSO2Con EU 2017] Microservices for Enterprises[WSO2Con EU 2017] Microservices for Enterprises
[WSO2Con EU 2017] Microservices for Enterprises
 

Recently uploaded

Demystifying Knowledge Management through Storytelling
Demystifying Knowledge Management through StorytellingDemystifying Knowledge Management through Storytelling
Demystifying Knowledge Management through Storytelling
Enterprise Knowledge
 
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge GraphGraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
Neo4j
 
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance PanelsNorthern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving
 
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
ScyllaDB
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 
A Deep Dive into ScyllaDB's Architecture
A Deep Dive into ScyllaDB's ArchitectureA Deep Dive into ScyllaDB's Architecture
A Deep Dive into ScyllaDB's Architecture
ScyllaDB
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
akankshawande
 
Mutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented ChatbotsMutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented Chatbots
Pablo Gómez Abajo
 
Must Know Postgres Extension for DBA and Developer during Migration
Must Know Postgres Extension for DBA and Developer during MigrationMust Know Postgres Extension for DBA and Developer during Migration
Must Know Postgres Extension for DBA and Developer during Migration
Mydbops
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
Miro Wengner
 
Christine's Supplier Sourcing Presentaion.pptx
Christine's Supplier Sourcing Presentaion.pptxChristine's Supplier Sourcing Presentaion.pptx
Christine's Supplier Sourcing Presentaion.pptx
christinelarrosa
 
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptxPRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
christinelarrosa
 
Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
Antonios Katsarakis
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
Tatiana Kojar
 
Essentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation ParametersEssentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation Parameters
Safe Software
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
DanBrown980551
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
Javier Junquera
 
Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |
AstuteBusiness
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
Zilliz
 

Recently uploaded (20)

Demystifying Knowledge Management through Storytelling
Demystifying Knowledge Management through StorytellingDemystifying Knowledge Management through Storytelling
Demystifying Knowledge Management through Storytelling
 
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge GraphGraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
 
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance PanelsNorthern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
 
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 
A Deep Dive into ScyllaDB's Architecture
A Deep Dive into ScyllaDB's ArchitectureA Deep Dive into ScyllaDB's Architecture
A Deep Dive into ScyllaDB's Architecture
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
 
Mutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented ChatbotsMutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented Chatbots
 
Must Know Postgres Extension for DBA and Developer during Migration
Must Know Postgres Extension for DBA and Developer during MigrationMust Know Postgres Extension for DBA and Developer during Migration
Must Know Postgres Extension for DBA and Developer during Migration
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
 
Christine's Supplier Sourcing Presentaion.pptx
Christine's Supplier Sourcing Presentaion.pptxChristine's Supplier Sourcing Presentaion.pptx
Christine's Supplier Sourcing Presentaion.pptx
 
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptxPRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
 
Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
 
Essentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation ParametersEssentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation Parameters
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
 
Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
 

Yuriy Chapran - Building microservices.

  • 1. ©2017 GlobalLogic Inc. Building microServices Yuriy Chapran
  • 2. ©2017 GlobalLogic Inc. Monolith What are microservies ? Design approaches used with microservices Questions 01 02 03 04
  • 3. ©2017 GlobalLogic Inc. How will you write service application ? Section Title − One or many processes ? − Database or standalone file ? − How will they all communicate ? − How will you upgrade ? − What if maximum amount of users will triple in first week ? − And grow ten times in a month ?
  • 5. ©2017 GlobalLogic Inc. Characteristics and Benefits Monolith Section Title − One build and deployment unit − One code base − One technology stack −Simple mental model for developers −Simple scaling model for operations - run multiple copies behind a load balancer
  • 6. ©2017 GlobalLogic Inc. Problems Monolith Section Title − Huge and intimidating code base for developers −Development tools get overburdened −Scaling is limited −Deployment frequency is limited
  • 7. ©2017 GlobalLogic Inc. Characteristics and Benefits Layered systems Section Title − A layered system decomposes a monolith into layers, usually: presentation, logic, data access − At most one technology stack per layer − Simple mental model, simple dependencies − Simple deployment and scaling model
  • 8. ©2017 GlobalLogic Inc. Problems Layered systems Section Title − Still huge codebases (one per layer) −Scaling works better, but still limited −Staff growth is limited: roughly speaking, one team per layer works well
  • 9. ©2017 GlobalLogic Inc. What are microservies ?02
  • 10. ©2017 GlobalLogic Inc. History Section Title −2011: First discussions using this term at a software architecture workshop near Venice −May 2012: microservices settled as the most appropriate term −March 2012: “Java, the Unix Way” at 33rd degree by James Lewis −September 2012: “µService Architecture“ at Baruco by Fred George −All along, Adrian Cockroft pioneered this style at Netflix as “fine grained SOA”
  • 11. ©2017 GlobalLogic Inc. Section Title What are Microservices ? Microservices are small, autonomous services that work together.
  • 12. ©2017 GlobalLogic Inc. Small with a single responsibility Section Title −Each application does only one thing −Small enough to fit in your head −Small enough that you can throw them away −Rewrite over Maintain
  • 13. ©2017 GlobalLogic Inc. Autonomous Section Title −Embedded container or package (deb or rpm etc.) −Packaged as a single executable −Along with their configuration files −And unix standard rc.d scripts −Installed separately −Communicating with other services over network, uses and exposes versioned API −No DB or files shared between two services
  • 14. ©2017 GlobalLogic Inc. Located in different SVC roots Section Title −Each application is completely separate −Domains in different bounded contexts should be distinct – and it's ok to have duplication – Use physical separation to enforce this −There will be common code, but it should be library and infrastructure code – treat it as you would any other open source library
  • 15. ©2017 GlobalLogic Inc. Microservices provide benefits… Tradeoffs Section Title − Strong Module Boundaries: Microservices reinforce modular structure, which is particularly important for larger teams. − Independent Deployment: Simple services are easier to deploy, and since they are autonomous, are less likely to cause system failures when they go wrong. − Technology Diversity: With microservices you can mix multiple languages, development frameworks and data-storage technologies. …but come with costs − Distribution: Distributed systems are harder to program, since remote calls are slow and are always at risk of failure. − Eventual Consistency: Maintaining strong consistency is extremely difficult for a distributed system, which means everyone has to manage eventual consistency. − Operational Complexity: You need a mature operations team to manage lots of services, which are being redeployed regularly. https://martinfowler.com/articles/microservice-trade-offs.html
  • 16. ©2017 GlobalLogic Inc. Service-oriented architecture (SOA) Section Title
  • 17. ©2017 GlobalLogic Inc. Design approaches used with microservices03
  • 18. ©2017 GlobalLogic Inc. Business microservice Section Title − Design the application with a set of modules where each is an independent business function with its own data, developed by a separate team and deployed in a separate process
  • 19. ©2017 GlobalLogic Inc. API gateway Section Title − Exposes system API to outer world - single entry point − Has no business logic! − Requests required information from specific microservices − Can perform protocol translation − Must be highly available
  • 20. ©2017 GlobalLogic Inc. Load balancers and Message queues Section Title −Decoupled and asynchronous using of messaging/events to remove peer-to-peer dependencies −Using Message Broker pattern −RabbitMQ, ZeroMQ
  • 21. ©2017 GlobalLogic Inc. Results cache Section Title −Some services, when called repeatedly, return the same data every time and don’t cause any side effects −Results Cache can be as simple as a Key-Value Store −Set lifetime limit for cache, from few seconds to few hours
  • 22. ©2017 GlobalLogic Inc. Circuit breaker Section Title
  • 23. ©2017 GlobalLogic Inc. Service registry + self registration + 3rd party registration + configuration as a service Section Title −Knows about all running services - physical IP address and service type −Gathers services health information, like status, uptime −Can gather and aggregate some microservices metrics
  • 24. ©2017 GlobalLogic Inc. Favour choreography over orchestration Section Title
  • 25. ©2017 GlobalLogic Inc. Adapter microservice Section Title − Converts existing service’s non microservice API to an API that client microservice will expect. − One of the first steps on migrating from Monolith to microServices
  • 26. ©2017 GlobalLogic Inc. Log aggregator Section Title
  • 27. ©2017 GlobalLogic Inc. Correlation ID Section Title − How do you debug a complex call graph when you do not know where in the set of microservices along that call graph the problem may have been introduced? −Simple identifier (usually just a number) −Passed into every service request −Is printed in the every log entry related to the request
  • 28. ©2017 GlobalLogic Inc. Health Check API Section Title − How to detect that a running service instance is unable to handle requests? −An alert should be generated when a service instance fails −Requests should be routed to working service instances − A service has an health check API endpoint that returns the health of the service
  • 29. ©2017 GlobalLogic Inc. Section Title − You need to know when and where to scale up or down − Bould with Load balancer and Service registry − Aggregating monitors with alers − Good, thought through metrics − processing rate - amount of processed req/sec − amount of succeeded and failed requests − length of requests queue - min, max, latest − connections status Application metrics
  • 30. ©2017 GlobalLogic Inc. Infrastructure automation - CI/CD Section Title
  • 31. ©2017 GlobalLogic Inc. Still there are much more ... Section Title
  • 34. ©2017 GlobalLogic Inc. This is cool Section Title −We haven’t even talked about −Versioning −Integration −Testing −Deployment −Security −Anti-patterns −Nanoservices −Data driven migration −...
  • 39. ©2017 GlobalLogic Inc. Literature Section Title − http://2012.33degree.org/pdf/JamesLewisMicroServices.pdf − http://www.braveterry.com/2014/04/10/presentation-service-architecture/ − http://www.pst.ifi.lmu.de/Lehre/wise-14-15/mse/microservice-architectures.pdf − https://martinfowler.com/microservices/ − http://nealford.com/downloads/Building_Microservice_Architectures_Neal_Ford.pdf − https://www.nginx.com/wp-content/uploads/2015/01/Building_Microservices_Nginx.pdf − http://transform.ca.com/API-microservice-architecture-oreilly-book.html − https://www.amazon.com/Microservices-Discover-Manage-Architecture/dp/151939733X − https://www.openshift.com/promotions/microservices.html − http://microservices.io − http://www.vinaysahni.com/best-practices-for-building-a-microservice-architecture