SlideShare une entreprise Scribd logo
1  sur  38
Télécharger pour lire hors ligne
The Need of Cloud-Native Application
(about Microservices, Containers, DevOps)
Emiliano Pecis
Senior Manager & Solution Architect
2
Agenda
Designing
Microservices
Introducing
New
Architectural
Style
Deploying
Cloud-Native
Application
Cloud-Native
Application
Lifecycle
Summary
Introducing New Architectural Style
4
What our customers want
1.  Improve Time To Market
2.  Scale On Demand
3.  More Resilient Systems
5
Why SOA can’t
1.  Improve Time To Market
2.  Scale On Demand
3.  More Resilient Systems
Think to the real-world use cases:
•  Is SOA able to introduce new features quickly?
•  Have you ever seen a SOA in the cloud?
•  Is SOA able to degrade gracefully?
6
Why Monolith can’t
Monolith is simple to develop, test and deploy but:
•  If project is alive it grows and become a ball of mud
•  It is too large for any single developer to fully understand
•  Startup time could take from 10 to 15 mins
•  A bug in any module can potentially bring down all
1.  Improve Time To Market
2.  Scale On Demand
3.  More Resilient Systems
7
Netflix was still operating as a monolith, a single
missing semicolon “;” brought down the entire Netflix
website for several hours…
Why monolith can’t
8
Yes, probably you’re right!
What do our customers need?
Cloud-Native Applications!
(able to live in distributed systems)
9
How to develop & deploy cloud-native applications?
Adopting a Microservices Architecture
Pattern leveraging on infrastructure
automation (on prem and cloud) using
DevOps tools and culture.
What do you mean?
10
Designing Microservices
11
Comparing Monolith Vs Microservices
Monolithic: Application
divided by technology
Microservices: Application
divided by domain
Image Credits:
12
Introducing Microservices
•  Microservices are “small Autonomous
services that work together”
•  All microservices must be
independently deployable and
upgradable
•  Microservices must respect “Single
Responsibility Principle”
•  Some microservices expose an API
that’s consumed by other microservices
•  Other microservices communicate with
each other through asynchronous
messaging
Image Credits:
13
Decentralized Data Management
•  The microservices architecture
pattern impacts the relationship
between application and the
database
•  Each of the services has its own
database
•  A service can use a type of
database that is best suited to its
needs!
•  It often results in duplication of
some data but is necessary to
ensures loose coupling!
Image Credits:
14
§  Orchestration needs a director
to change things at runtime
§  The downside to this
orchestration approach is that
the customer service can
become too much of a central
governing authority
Orchestration Vs Choreography
§  Choreography is decided at
design time (but you can
change frequently thanks to
CD)
§  The downside is the
monitoring that is too
complex
Customer Service
Loyalty points bank
Post Service
Email Service
Create point balance
Send Welcome Pack
Send Welcome Pack
Customer created
event
Loyalty points bank
Post Service
Email Service
Subscribes
Subscribes
Subscribes
Customer Service
Publishes
15
The need of API Gateway
•  An API Gateway is a server that is the
single entry point into the system
•  The API Gateway is responsible for
request routing, composition, and
protocol translation
•  All requests from clients first go through
the API Gateway. It then routes requests
to the appropriate microservice
•  It might have other responsibilities such
as authentication, monitoring, load
balancing, caching, request shaping and
management, and static response
handling
Image Credits:
16
The need of API Gateway
•  To reduce the chattiness
inherent in the REST API,
the discrete requests in
the diagram above will be
collapsed into a single
request optimized for a
given client.
•  The benefit is that the
device then pays the price
of WAN latency once and
leverages the low latency
and more powerful
hardware server-side.
17
The need of Service Discovery
•  The network location of a
service instance is registered
with the service registry
when it starts up
•  It is removed from the
service registry when the
instance terminates
•  The service instance’s
registration is typically
refreshed periodically using
a heartbeat mechanism
Image Credits:
18
The need of Circuit Breaker
•  Circuit breaker pattern: track the number of successful and failed requests. If the error
rate exceeds a configured threshold, close the circuit breaker so that further attempts
fail immediately.
•  If a large number of requests are failing, that suggests the service is unavailable and
that sending requests is pointless. After a timeout period, the client should try again
and, if successful, close the circuit breaker.
•  Provide fallbacks: perform fallback logic when a request fails. For example, return
cached data or a default value, such as an empty set of recommendations.
19
Don’t reinvent the wheel!
Netflix open sourced all its software and Spring
has productized all of them:
•  Netflix Eureka: Service registry & discovery
•  Netflix Hystrix: Circuit breaker and dashboard
•  Netflix Ribbon: Client-side load balancing
•  Netflix Zuul: Reverse proxy for API Gateway
•  Spring Cloud Config: Centralize configuration
•  Spring Cloud Bus: Publish events over RabbitMQ
Lightbend built a new Microservices framework from
scratch called Lagom, composed by:
•  Play
•  Akka
•  Cassandra
•  Sbt
•  Guice
20
Good. But what about Data Consistency?
Consistency
Partition
Tolerance
Availability
N/A
•  Acid Transactios are
perfect in a monolithic
application
•  They cannot work on
distributed system
because of CAP Theorem
but also because, by
design:
•  Each microservice
can have a different
type of database
•  The data owned by
each microservice is
private and can only
by accessed via its
API
CAP Theorem: pick 2 of 3
21
How to address distributed data management
Image Credits:
22
How to address distributed data management
Image Credits:
Deploying Cloud-Native
Application
24
Virtual Machines needs care and
feeding:
§  Name the VM
§  Tune and groom regulary
§  Feed pets with good food
§  Take pets to the vet when they are sick
Treating servers as cattle, not as pets!
Cloud servers are disposable:
§  VM are not unique
§  Tune and groom apps not the cattle
§  Replace when necessary
§  Kill it when it is sick
25
Docker is a shipping container system for code
26
Docker Vs classic VM
27
Docker ecosystem
•  Docker Compose is a tool for defining
and running multi-container Docker
applications
•  Docker Swarm provides native
clustering capabilities to turn a group of
Docker engines into a single, virtual
Docker Engine. With these pooled
resources, you can scale out your
application as if it were running on a
single, huge computer.
•  Docker Hub is Docker’s cloud service for
publishing and discovering container
images through the public registry
28
RedHat OpenShift
(RedHat’s Containers As A Service)
Image Credits: RedHat
Cloud-Native Application
LifeCycle (DevOps & CD)
30
Life Cycle changes with Microservices
!
•  Cross-functional team. Because we are
following mostly the domain-driven
approach, the idea is to have a cross-
functional team
•  Just two pizzas. Jeff Bezos said:“If you
can't feed a team with two pizzas, it's too
large. That limits a task force to five to
seven people, depending on their
appetites”
•  Products not Projects. Team responsible
for a service should own a product over its
full lifetime, from development to
mantainance.!
31
What does “cross-functional team” mean?
•  A team able to develop, test, deploy a
(micro)service from dev to production
env
•  A team with the all necessary skills:
developers, testers, dba, sysadmins,
and so on…
•  A team that takes responsability of its
project product
All these things mean DevOps!
32
Continuous Delivery is necessary
Summary
34 Image Credits:
35 Image Credits:
36 Image Credits:
37 Image Credits:
Thanks

Contenu connexe

Tendances

Tendances (20)

Microservices Architecture & Testing Strategies
Microservices Architecture & Testing StrategiesMicroservices Architecture & Testing Strategies
Microservices Architecture & Testing Strategies
 
Microservices Docker Kubernetes Istio Kanban DevOps SRE
Microservices Docker Kubernetes Istio Kanban DevOps SREMicroservices Docker Kubernetes Istio Kanban DevOps SRE
Microservices Docker Kubernetes Istio Kanban DevOps SRE
 
The twelve factor app
The twelve factor appThe twelve factor app
The twelve factor app
 
Why Microservice
Why Microservice Why Microservice
Why Microservice
 
Microservice Architecture
Microservice ArchitectureMicroservice Architecture
Microservice Architecture
 
Microservices, Kubernetes and Istio - A Great Fit!
Microservices, Kubernetes and Istio - A Great Fit!Microservices, Kubernetes and Istio - A Great Fit!
Microservices, Kubernetes and Istio - A Great Fit!
 
The Ideal Approach to Application Modernization; Which Way to the Cloud?
The Ideal Approach to Application Modernization; Which Way to the Cloud?The Ideal Approach to Application Modernization; Which Way to the Cloud?
The Ideal Approach to Application Modernization; Which Way to the Cloud?
 
Your Journey to Cloud-Native Begins with DevOps, Microservices, and Containers
Your Journey to Cloud-Native Begins with DevOps, Microservices, and ContainersYour Journey to Cloud-Native Begins with DevOps, Microservices, and Containers
Your Journey to Cloud-Native Begins with DevOps, Microservices, and Containers
 
Cloud Native: what is it? Why?
Cloud Native: what is it? Why?Cloud Native: what is it? Why?
Cloud Native: what is it? Why?
 
Openshift Container Platform
Openshift Container PlatformOpenshift Container Platform
Openshift Container Platform
 
App Modernization
App ModernizationApp Modernization
App Modernization
 
Micro services vs Monolith Architecture
Micro services vs Monolith ArchitectureMicro services vs Monolith Architecture
Micro services vs Monolith Architecture
 
Microservices architecture
Microservices architectureMicroservices architecture
Microservices architecture
 
Azure API Management
Azure API ManagementAzure API Management
Azure API Management
 
Introduction To Microservices
Introduction To MicroservicesIntroduction To Microservices
Introduction To Microservices
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
 
Microservices architecture
Microservices architectureMicroservices architecture
Microservices architecture
 
Introduction of Kubernetes - Trang Nguyen
Introduction of Kubernetes - Trang NguyenIntroduction of Kubernetes - Trang Nguyen
Introduction of Kubernetes - Trang Nguyen
 
Microservices Architecture - Bangkok 2018
Microservices Architecture - Bangkok 2018Microservices Architecture - Bangkok 2018
Microservices Architecture - Bangkok 2018
 
Microservices for Application Modernisation
Microservices for Application ModernisationMicroservices for Application Modernisation
Microservices for Application Modernisation
 

En vedette

The Cloud Native Journey
The Cloud Native JourneyThe Cloud Native Journey
The Cloud Native Journey
VMware Tanzu
 

En vedette (20)

Cloud-Native-Data with Cornelia Davis
Cloud-Native-Data with Cornelia DavisCloud-Native-Data with Cornelia Davis
Cloud-Native-Data with Cornelia Davis
 
Openshift Container Platform on Azure
Openshift Container Platform on AzureOpenshift Container Platform on Azure
Openshift Container Platform on Azure
 
Azure DevDays - Business benefits of native cloud applications
Azure DevDays  -  Business benefits of native cloud applicationsAzure DevDays  -  Business benefits of native cloud applications
Azure DevDays - Business benefits of native cloud applications
 
Patterns of Cloud Native Architecture
Patterns of Cloud Native ArchitecturePatterns of Cloud Native Architecture
Patterns of Cloud Native Architecture
 
The Application Server Platform of the Future - Container & Cloud Native and ...
The Application Server Platform of the Future - Container & Cloud Native and ...The Application Server Platform of the Future - Container & Cloud Native and ...
The Application Server Platform of the Future - Container & Cloud Native and ...
 
Microsoft Azure Big Data Analytics
Microsoft Azure Big Data AnalyticsMicrosoft Azure Big Data Analytics
Microsoft Azure Big Data Analytics
 
Cloud Native Architectures for Devops
Cloud Native Architectures for DevopsCloud Native Architectures for Devops
Cloud Native Architectures for Devops
 
Infinite power at your fingertips with Microsoft Azure Cloud & ActiveEon
Infinite power at your fingertips with Microsoft Azure Cloud & ActiveEonInfinite power at your fingertips with Microsoft Azure Cloud & ActiveEon
Infinite power at your fingertips with Microsoft Azure Cloud & ActiveEon
 
Make a Move to the Azure Cloud with SoftNAS
Make a Move to the Azure Cloud with SoftNASMake a Move to the Azure Cloud with SoftNAS
Make a Move to the Azure Cloud with SoftNAS
 
Cloud native application 입문
Cloud native application 입문Cloud native application 입문
Cloud native application 입문
 
B3 getting started_with_cloud_native_development
B3 getting started_with_cloud_native_developmentB3 getting started_with_cloud_native_development
B3 getting started_with_cloud_native_development
 
Agile Development and DevOps in the Oracle Cloud
Agile Development and DevOps in the Oracle CloudAgile Development and DevOps in the Oracle Cloud
Agile Development and DevOps in the Oracle Cloud
 
Building Cloud Native Software
Building Cloud Native SoftwareBuilding Cloud Native Software
Building Cloud Native Software
 
Cloud Native, Cloud First, and Hybrid - AWS Summit Bahrain 2017
Cloud Native, Cloud First, and Hybrid - AWS Summit Bahrain 2017Cloud Native, Cloud First, and Hybrid - AWS Summit Bahrain 2017
Cloud Native, Cloud First, and Hybrid - AWS Summit Bahrain 2017
 
Building scalable cloud-native applications (Sam Vanhoutte at Codit Azure Paa...
Building scalable cloud-native applications (Sam Vanhoutte at Codit Azure Paa...Building scalable cloud-native applications (Sam Vanhoutte at Codit Azure Paa...
Building scalable cloud-native applications (Sam Vanhoutte at Codit Azure Paa...
 
Cloud Native, Cloud First and Hybrid: How Different Organizations are Approac...
Cloud Native, Cloud First and Hybrid: How Different Organizations are Approac...Cloud Native, Cloud First and Hybrid: How Different Organizations are Approac...
Cloud Native, Cloud First and Hybrid: How Different Organizations are Approac...
 
Landscape Cloud-Native Roadshow Los Angeles
Landscape Cloud-Native Roadshow Los AngelesLandscape Cloud-Native Roadshow Los Angeles
Landscape Cloud-Native Roadshow Los Angeles
 
The Cloud Native Journey
The Cloud Native JourneyThe Cloud Native Journey
The Cloud Native Journey
 
Oracle: Building Cloud Native Applications
Oracle: Building Cloud Native ApplicationsOracle: Building Cloud Native Applications
Oracle: Building Cloud Native Applications
 
Microservices + Oracle: A Bright Future
Microservices + Oracle: A Bright FutureMicroservices + Oracle: A Bright Future
Microservices + Oracle: A Bright Future
 

Similaire à The Need of Cloud-Native Application

Similaire à The Need of Cloud-Native Application (20)

Containers, microservices and serverless for realists
Containers, microservices and serverless for realistsContainers, microservices and serverless for realists
Containers, microservices and serverless for realists
 
Cloud-native Data
Cloud-native DataCloud-native Data
Cloud-native Data
 
Cloud-native Data: Every Microservice Needs a Cache
Cloud-native Data: Every Microservice Needs a CacheCloud-native Data: Every Microservice Needs a Cache
Cloud-native Data: Every Microservice Needs a Cache
 
Serverless microservices
Serverless microservicesServerless microservices
Serverless microservices
 
QCon 2015 - Microservices Track Notes
QCon 2015 - Microservices Track Notes QCon 2015 - Microservices Track Notes
QCon 2015 - Microservices Track Notes
 
Building a [micro]services platform on AWS
Building a [micro]services platform on AWSBuilding a [micro]services platform on AWS
Building a [micro]services platform on AWS
 
Deploying at will - SEI
 Deploying at will - SEI Deploying at will - SEI
Deploying at will - SEI
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
 
Enterprise Journey to the Cloud
Enterprise Journey to the CloudEnterprise Journey to the Cloud
Enterprise Journey to the Cloud
 
Spring cloud
Spring cloudSpring cloud
Spring cloud
 
From Monoliths to Services: Grafually paying your Technical Debt
From Monoliths to Services: Grafually paying your Technical DebtFrom Monoliths to Services: Grafually paying your Technical Debt
From Monoliths to Services: Grafually paying your Technical Debt
 
Software Architecture and Architectors: useless VS valuable
Software Architecture and Architectors: useless VS valuableSoftware Architecture and Architectors: useless VS valuable
Software Architecture and Architectors: useless VS valuable
 
Iot cloud service v2.0
Iot cloud service v2.0Iot cloud service v2.0
Iot cloud service v2.0
 
The Overview of Microservices Architecture
The Overview of Microservices ArchitectureThe Overview of Microservices Architecture
The Overview of Microservices Architecture
 
Microservices in Action
Microservices in ActionMicroservices in Action
Microservices in Action
 
Introduction-to-Cloud-Computing.pdf
Introduction-to-Cloud-Computing.pdfIntroduction-to-Cloud-Computing.pdf
Introduction-to-Cloud-Computing.pdf
 
Serverless brewbox
Serverless   brewboxServerless   brewbox
Serverless brewbox
 
Architectural Decisions: Smoothly and Consistently
Architectural Decisions: Smoothly and ConsistentlyArchitectural Decisions: Smoothly and Consistently
Architectural Decisions: Smoothly and Consistently
 
Architectural Decisions: Smoothly and Consistently
Architectural Decisions: Smoothly and ConsistentlyArchitectural Decisions: Smoothly and Consistently
Architectural Decisions: Smoothly and Consistently
 
Modernizing the Legacy - How Dish is Adapting its SOA Services for a Cloud Fi...
Modernizing the Legacy - How Dish is Adapting its SOA Services for a Cloud Fi...Modernizing the Legacy - How Dish is Adapting its SOA Services for a Cloud Fi...
Modernizing the Legacy - How Dish is Adapting its SOA Services for a Cloud Fi...
 

Plus de Emiliano Pecis

AI as a Service: the future has never been so simple with cloud
AI as a Service: the future has never been so simple with cloudAI as a Service: the future has never been so simple with cloud
AI as a Service: the future has never been so simple with cloud
Emiliano Pecis
 

Plus de Emiliano Pecis (10)

AI as a Service: the future has never been so simple with cloud
AI as a Service: the future has never been so simple with cloudAI as a Service: the future has never been so simple with cloud
AI as a Service: the future has never been so simple with cloud
 
Leadership. Le lezioni apprese da Genitore.
Leadership. Le lezioni apprese da Genitore.Leadership. Le lezioni apprese da Genitore.
Leadership. Le lezioni apprese da Genitore.
 
Servant Leadership e Lean Development. L'unico matrimonio possibile.
Servant Leadership e Lean Development. L'unico matrimonio possibile.Servant Leadership e Lean Development. L'unico matrimonio possibile.
Servant Leadership e Lean Development. L'unico matrimonio possibile.
 
Oracle Coherence: in-memory datagrid
Oracle Coherence: in-memory datagridOracle Coherence: in-memory datagrid
Oracle Coherence: in-memory datagrid
 
Enterprise 2.0. How Iron Man would work...
Enterprise 2.0. How Iron Man would work...Enterprise 2.0. How Iron Man would work...
Enterprise 2.0. How Iron Man would work...
 
Woa. Reloaded
Woa. ReloadedWoa. Reloaded
Woa. Reloaded
 
The RESTful Soa Datagrid with Oracle
The RESTful Soa Datagrid with OracleThe RESTful Soa Datagrid with Oracle
The RESTful Soa Datagrid with Oracle
 
Enteprise 2.0 paths (in 5 slides)
Enteprise 2.0 paths (in 5 slides)Enteprise 2.0 paths (in 5 slides)
Enteprise 2.0 paths (in 5 slides)
 
How to maximize collective intelligence
How to maximize collective intelligenceHow to maximize collective intelligence
How to maximize collective intelligence
 
Web Oriented Architecture at Oracle
Web Oriented Architecture at OracleWeb Oriented Architecture at Oracle
Web Oriented Architecture at Oracle
 

Dernier

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Dernier (20)

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 

The Need of Cloud-Native Application

  • 1. The Need of Cloud-Native Application (about Microservices, Containers, DevOps) Emiliano Pecis Senior Manager & Solution Architect
  • 4. 4 What our customers want 1.  Improve Time To Market 2.  Scale On Demand 3.  More Resilient Systems
  • 5. 5 Why SOA can’t 1.  Improve Time To Market 2.  Scale On Demand 3.  More Resilient Systems Think to the real-world use cases: •  Is SOA able to introduce new features quickly? •  Have you ever seen a SOA in the cloud? •  Is SOA able to degrade gracefully?
  • 6. 6 Why Monolith can’t Monolith is simple to develop, test and deploy but: •  If project is alive it grows and become a ball of mud •  It is too large for any single developer to fully understand •  Startup time could take from 10 to 15 mins •  A bug in any module can potentially bring down all 1.  Improve Time To Market 2.  Scale On Demand 3.  More Resilient Systems
  • 7. 7 Netflix was still operating as a monolith, a single missing semicolon “;” brought down the entire Netflix website for several hours… Why monolith can’t
  • 8. 8 Yes, probably you’re right! What do our customers need? Cloud-Native Applications! (able to live in distributed systems)
  • 9. 9 How to develop & deploy cloud-native applications? Adopting a Microservices Architecture Pattern leveraging on infrastructure automation (on prem and cloud) using DevOps tools and culture. What do you mean?
  • 11. 11 Comparing Monolith Vs Microservices Monolithic: Application divided by technology Microservices: Application divided by domain Image Credits:
  • 12. 12 Introducing Microservices •  Microservices are “small Autonomous services that work together” •  All microservices must be independently deployable and upgradable •  Microservices must respect “Single Responsibility Principle” •  Some microservices expose an API that’s consumed by other microservices •  Other microservices communicate with each other through asynchronous messaging Image Credits:
  • 13. 13 Decentralized Data Management •  The microservices architecture pattern impacts the relationship between application and the database •  Each of the services has its own database •  A service can use a type of database that is best suited to its needs! •  It often results in duplication of some data but is necessary to ensures loose coupling! Image Credits:
  • 14. 14 §  Orchestration needs a director to change things at runtime §  The downside to this orchestration approach is that the customer service can become too much of a central governing authority Orchestration Vs Choreography §  Choreography is decided at design time (but you can change frequently thanks to CD) §  The downside is the monitoring that is too complex Customer Service Loyalty points bank Post Service Email Service Create point balance Send Welcome Pack Send Welcome Pack Customer created event Loyalty points bank Post Service Email Service Subscribes Subscribes Subscribes Customer Service Publishes
  • 15. 15 The need of API Gateway •  An API Gateway is a server that is the single entry point into the system •  The API Gateway is responsible for request routing, composition, and protocol translation •  All requests from clients first go through the API Gateway. It then routes requests to the appropriate microservice •  It might have other responsibilities such as authentication, monitoring, load balancing, caching, request shaping and management, and static response handling Image Credits:
  • 16. 16 The need of API Gateway •  To reduce the chattiness inherent in the REST API, the discrete requests in the diagram above will be collapsed into a single request optimized for a given client. •  The benefit is that the device then pays the price of WAN latency once and leverages the low latency and more powerful hardware server-side.
  • 17. 17 The need of Service Discovery •  The network location of a service instance is registered with the service registry when it starts up •  It is removed from the service registry when the instance terminates •  The service instance’s registration is typically refreshed periodically using a heartbeat mechanism Image Credits:
  • 18. 18 The need of Circuit Breaker •  Circuit breaker pattern: track the number of successful and failed requests. If the error rate exceeds a configured threshold, close the circuit breaker so that further attempts fail immediately. •  If a large number of requests are failing, that suggests the service is unavailable and that sending requests is pointless. After a timeout period, the client should try again and, if successful, close the circuit breaker. •  Provide fallbacks: perform fallback logic when a request fails. For example, return cached data or a default value, such as an empty set of recommendations.
  • 19. 19 Don’t reinvent the wheel! Netflix open sourced all its software and Spring has productized all of them: •  Netflix Eureka: Service registry & discovery •  Netflix Hystrix: Circuit breaker and dashboard •  Netflix Ribbon: Client-side load balancing •  Netflix Zuul: Reverse proxy for API Gateway •  Spring Cloud Config: Centralize configuration •  Spring Cloud Bus: Publish events over RabbitMQ Lightbend built a new Microservices framework from scratch called Lagom, composed by: •  Play •  Akka •  Cassandra •  Sbt •  Guice
  • 20. 20 Good. But what about Data Consistency? Consistency Partition Tolerance Availability N/A •  Acid Transactios are perfect in a monolithic application •  They cannot work on distributed system because of CAP Theorem but also because, by design: •  Each microservice can have a different type of database •  The data owned by each microservice is private and can only by accessed via its API CAP Theorem: pick 2 of 3
  • 21. 21 How to address distributed data management Image Credits:
  • 22. 22 How to address distributed data management Image Credits:
  • 24. 24 Virtual Machines needs care and feeding: §  Name the VM §  Tune and groom regulary §  Feed pets with good food §  Take pets to the vet when they are sick Treating servers as cattle, not as pets! Cloud servers are disposable: §  VM are not unique §  Tune and groom apps not the cattle §  Replace when necessary §  Kill it when it is sick
  • 25. 25 Docker is a shipping container system for code
  • 27. 27 Docker ecosystem •  Docker Compose is a tool for defining and running multi-container Docker applications •  Docker Swarm provides native clustering capabilities to turn a group of Docker engines into a single, virtual Docker Engine. With these pooled resources, you can scale out your application as if it were running on a single, huge computer. •  Docker Hub is Docker’s cloud service for publishing and discovering container images through the public registry
  • 28. 28 RedHat OpenShift (RedHat’s Containers As A Service) Image Credits: RedHat
  • 30. 30 Life Cycle changes with Microservices ! •  Cross-functional team. Because we are following mostly the domain-driven approach, the idea is to have a cross- functional team •  Just two pizzas. Jeff Bezos said:“If you can't feed a team with two pizzas, it's too large. That limits a task force to five to seven people, depending on their appetites” •  Products not Projects. Team responsible for a service should own a product over its full lifetime, from development to mantainance.!
  • 31. 31 What does “cross-functional team” mean? •  A team able to develop, test, deploy a (micro)service from dev to production env •  A team with the all necessary skills: developers, testers, dba, sysadmins, and so on… •  A team that takes responsability of its project product All these things mean DevOps!