SlideShare a Scribd company logo
Microservices
Pros & Cons
Things to Think About
What is a microservice?
 Small piece of software that does one thing really well
 Loosely coupled
 Separate data store
 Just enough to solve a problem
 Right technology for the job
 Autonomous
 Can update as often as is needed
 Intelligence in the service, not the routing/infrastructure/bus
 Immutable infrastructure
Should I use microservices?
 It depends!
 Likely no
 Think about fallacies of distributed computing:
 The network is reliable
 Latency is zero
 Bandwidth is infinite
 The network is secure
 Topology doesn’t change
 There is one administrator
 Transport cost is zero
 The network is homogeneous
When should I consider microservices?
 Many teams work on the same code base
 Merge hell, cross team dependencies, ...
 Huge monolithic application which is difficult to deploy
 Monolith cannot be scaled horizontally
 Different parts of the application have totally different requirements
 CPU bound
 I/O bound
 Memory bound
 etc.
 Some but not all areas of the application change frequently
 Development stack is outdated. New tools and patterns are hard if
not impossible to embrace
How big should a microservice be?
 Small enough to fit full context in your head
 Big enough to solve a problem
 Owned by one team
What does “big enough” look like...
Some examples:
 Lambda: https://github.com/meconlin/lambda-generic-microservice
 C#: https://github.com/AFASSoftware/CQRS-Microservices
 Spring: https://github.com/kbastani/spring-cloud-microservice-example
 akka: https://github.com/theiterators/akka-http-microservice
 https://github.com/dustinbarnes/microservice-example
How should a microservice communicate?
 Synchronous
 Asynchronous
 Messaging
 Fan out
 HTTP/REST
 TCP/IP
 Pub/sub
...but zero logic in the communication pipeline!
Are microservices less complex?
 Code wise, yes
 Deployment wise, yes
 Infrastructure
configuration wise, no
 Dependency management
wise, no
Microservice Management
Overview
How to manage microservices?
It’s a big world with lots of cutely named tools!
• Deploy: Jenkins / TeamCity / Ansible / Chef / Capistrano / StackStorm
• Discovery/config: Consul / Consul-Templates / etcd / Registrator / skydns
• Containers: Docker / Compose / Vagrant / Otto / Lambda
• Container Clustering: ECS / Kubernetes / Mesos / Docker Swarm
• Request Routing: Nginx / HAProxy / Kong / API Gateway
• Self Healing: Consul / ZooKeeper / Serf
• System Health: hystrix, SumoLogic, Nagios, NewRelic, statsd, LogEntries
AUTOMATE EVERYTHING
Deployment
 Continuous Deployment
 Continuous Delivery
 Versioned
 Blue / Green
 A-B Testing
 Net new, add to routing
 Zero downtime
Tools: Jenkins / TeamCity / Ansible / Chef / Capistrano / StackStorm
NEVER DESTRUCTIVE
Service Discovery & Configuration
 Minimize known dependencies
 No bottlenecks due to outage allowed
 Down stream health monitoring
 Configuration at deployment time when possible
 Configuration in runtime if you have to (adds fragility/degradation)
Tools: Consul / Consul-Templates / etcd / Registrator / skydns
NO DEPENDENCY KNOWLEDGE
Containers & Clustering
 Removes “works on my box” story
 Installed software dependencies become constrained to your need
 No more “servers as pets”
 Infrastructure as code becomes a reality
 Can deploy to fabric/cluster for better auto scaling story
 Serverless truly abstracts hardware from application
Tools: Docker / Compose / Vagrant / Otto / Lambda / AWS ECS /
Kubernetes / Mesos / Docker Swarm
NO HARDWARE DEPENDENCY PREFERRED
Request Routing
 Public abstraction from internal details
 Internal location can become dynamic
 Multiple versions of the same thing can be long lived
 Makes deployment story more flexible
 Live traffic can be drained over
 Warming up new instances is possible
Tools: Nginx / HAProxy / Kong / API Gateway
NEVER EXPOSE YOUR SERVICES DIRECTLY
Self Healing
It’s not IF it will fail but WHEN it will fail!
 Auto healing
 Automated Remediation
 Circuit breaker
 Fallbacks
 Graceful degradation
 Don’t cascade failures
Tools: Consul / ZooKeeper / Serf
PLAN FOR FAILURE FIRST
System Health
 Measure anything, measure everything
 https://codeascraft.com/2011/02/15/measure-anything-measure-everything/
 Performance monitoring, exception monitoring, logs, metrics
 NewRelic, nagios, SumoLogic
 statsd / graphite (hosted graphite) / kibana / grafana
 Centralized logging (logentries, logstash)
 Circuit Breaker (hystrix)
Tools: hystrix, SumoLogic, Nagios, NewRelic, statsd, LogEntries
VISUALIZE EVERYTHING
Circuit Breakers with Hystrix
Microservices pros and cons
Microservices pros and cons
Questions?
James Allen
http://www.linkedin.com/in/jamesallenatx
Miguel Gonzalez
https://www.linkedin.com/in/magonz
@doesnotcompile
Gabriel Schenker
https://www.linkedin.com/in/gabrielschenker
@gnschenker
Andrew Siemer
https://www.linkedin.com/in/andrewsiemer
@asiemer

More Related Content

PDF
Microservices pros and cons - houston tech fest
PPTX
Serverless lessons learned #4 circuit breaker
PPTX
Serverless lessons learned #5 retries
PDF
Divide and Conquer: Easier Continuous Delivery using Micro-Services
PPTX
Demystifying microservices inside Azure AKS Codecamp Radu Vunvulea 2018
PPTX
TechEd NZ 2014: Building Web Applications at Scale with Azure Web Sites
PDF
How to build a social network on serverless
PDF
Troubleshooting serverless applications
Microservices pros and cons - houston tech fest
Serverless lessons learned #4 circuit breaker
Serverless lessons learned #5 retries
Divide and Conquer: Easier Continuous Delivery using Micro-Services
Demystifying microservices inside Azure AKS Codecamp Radu Vunvulea 2018
TechEd NZ 2014: Building Web Applications at Scale with Azure Web Sites
How to build a social network on serverless
Troubleshooting serverless applications

What's hot (13)

PDF
API310 - How to refactor a monolith to serverless in 8 steps
PDF
Debugging AWS Lambda Performance Issues
PPTX
Serverless lessons learned #3 reserved concurrency
PDF
I Am MongoDB – And So Can You!
PDF
Computaris cloud and DevOps services
PDF
How to build observability into a serverless application
PDF
A Smarter World: The Mesh of Interconnected Devices and Artificial Intelligen...
PPTX
Developing reliable applications with .net core and AKS
PPTX
Creating scalable message driven solutions akkadotnet
PDF
Dos and don'ts in AWS
PDF
Azure Lab Services
PDF
Serverless and CI/CD
PDF
The present and future of Serverless observability
API310 - How to refactor a monolith to serverless in 8 steps
Debugging AWS Lambda Performance Issues
Serverless lessons learned #3 reserved concurrency
I Am MongoDB – And So Can You!
Computaris cloud and DevOps services
How to build observability into a serverless application
A Smarter World: The Mesh of Interconnected Devices and Artificial Intelligen...
Developing reliable applications with .net core and AKS
Creating scalable message driven solutions akkadotnet
Dos and don'ts in AWS
Azure Lab Services
Serverless and CI/CD
The present and future of Serverless observability
Ad

Viewers also liked (7)

PPT
Ucmdb DDM and DDMA
PDF
UCMDB _Predictive Change Impact Analysis circa 2009
PDF
Spring 4.0 - Evolution or Revolution
PDF
Microservices vs monolithic
PPTX
Introduction to Microservices and Cloud Native Application Architecture
PPTX
Enterprise, Architecture and IoT
POT
Accenture Liquid Application Studio
Ucmdb DDM and DDMA
UCMDB _Predictive Change Impact Analysis circa 2009
Spring 4.0 - Evolution or Revolution
Microservices vs monolithic
Introduction to Microservices and Cloud Native Application Architecture
Enterprise, Architecture and IoT
Accenture Liquid Application Studio
Ad

Similar to Microservices pros and cons (20)

PPTX
Microservices pros and cons dark
PDF
Docebo: history of a journey from legacy to serverless
PDF
Spring Cloud Gateway - Nate Schutta
PDF
The Future of Cloud Innovation, featuring Adrian Cockcroft
PDF
Gluecon Monitoring Microservices and Containers: A Challenge
PDF
modern-guide-to-container-monitoring-and-orchestration.pdf
PPTX
Problems you’ll face in the Microservices World: Configuration, Authenticatio...
PDF
Evolving to Cloud-Native - Nate Schutta (2/2)
PDF
[Capitole du Libre] #serverless -  mettez-le en oeuvre dans votre entreprise...
PDF
The Case Against Microservices
PDF
Evolving to Cloud-Native - Nate Schutta 2/2
PDF
Spring Boot & Spring Cloud on PAS- Nate Schutta (1/2)
PPTX
Security for AWS : Journey to Least Privilege (update)
PDF
Security for AWS: Journey to Least Privilege
PDF
.NET Cloud-Native Bootcamp- Los Angeles
PPTX
Crash Course in Open Source Cloud Computing
PPTX
AWS Serverless Community Day Keynote and Vendia Launch 6-26-2020
PDF
APIs & Underlying Protocols #APICraftSF
PDF
The Revolution Will Not Be Centralized
PDF
RedisConf18 - Common Redis Use Cases for Cloud Native Apps and Microservices
Microservices pros and cons dark
Docebo: history of a journey from legacy to serverless
Spring Cloud Gateway - Nate Schutta
The Future of Cloud Innovation, featuring Adrian Cockcroft
Gluecon Monitoring Microservices and Containers: A Challenge
modern-guide-to-container-monitoring-and-orchestration.pdf
Problems you’ll face in the Microservices World: Configuration, Authenticatio...
Evolving to Cloud-Native - Nate Schutta (2/2)
[Capitole du Libre] #serverless -  mettez-le en oeuvre dans votre entreprise...
The Case Against Microservices
Evolving to Cloud-Native - Nate Schutta 2/2
Spring Boot & Spring Cloud on PAS- Nate Schutta (1/2)
Security for AWS : Journey to Least Privilege (update)
Security for AWS: Journey to Least Privilege
.NET Cloud-Native Bootcamp- Los Angeles
Crash Course in Open Source Cloud Computing
AWS Serverless Community Day Keynote and Vendia Launch 6-26-2020
APIs & Underlying Protocols #APICraftSF
The Revolution Will Not Be Centralized
RedisConf18 - Common Redis Use Cases for Cloud Native Apps and Microservices

More from Andrew Siemer (8)

PDF
20 tips for website performance
PPTX
Reigniting the Volusion platform
PPTX
Grokking microservices in 5 minutes
PPTX
Making your API behave like a big boy
PPTX
Load testing with Visual Studio and Azure - Andrew Siemer
PPTX
Test driving Azure Search and DocumentDB
PPTX
A tale of two clouds
PPTX
Introduction to CQRS - command and query responsibility segregation
20 tips for website performance
Reigniting the Volusion platform
Grokking microservices in 5 minutes
Making your API behave like a big boy
Load testing with Visual Studio and Azure - Andrew Siemer
Test driving Azure Search and DocumentDB
A tale of two clouds
Introduction to CQRS - command and query responsibility segregation

Recently uploaded (20)

PDF
How Creative Agencies Leverage Project Management Software.pdf
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
System and Network Administration Chapter 2
PPT
Introduction Database Management System for Course Database
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PDF
AI in Product Development-omnex systems
PPTX
history of c programming in notes for students .pptx
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PDF
Digital Strategies for Manufacturing Companies
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PPTX
CHAPTER 2 - PM Management and IT Context
PDF
System and Network Administraation Chapter 3
PPTX
Odoo POS Development Services by CandidRoot Solutions
PDF
Understanding Forklifts - TECH EHS Solution
PDF
Design an Analysis of Algorithms II-SECS-1021-03
How Creative Agencies Leverage Project Management Software.pdf
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Odoo Companies in India – Driving Business Transformation.pdf
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
System and Network Administration Chapter 2
Introduction Database Management System for Course Database
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
AI in Product Development-omnex systems
history of c programming in notes for students .pptx
How to Migrate SBCGlobal Email to Yahoo Easily
Digital Strategies for Manufacturing Companies
Wondershare Filmora 15 Crack With Activation Key [2025
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
CHAPTER 2 - PM Management and IT Context
System and Network Administraation Chapter 3
Odoo POS Development Services by CandidRoot Solutions
Understanding Forklifts - TECH EHS Solution
Design an Analysis of Algorithms II-SECS-1021-03

Microservices pros and cons

  • 2. What is a microservice?  Small piece of software that does one thing really well  Loosely coupled  Separate data store  Just enough to solve a problem  Right technology for the job  Autonomous  Can update as often as is needed  Intelligence in the service, not the routing/infrastructure/bus  Immutable infrastructure
  • 3. Should I use microservices?  It depends!  Likely no  Think about fallacies of distributed computing:  The network is reliable  Latency is zero  Bandwidth is infinite  The network is secure  Topology doesn’t change  There is one administrator  Transport cost is zero  The network is homogeneous
  • 4. When should I consider microservices?  Many teams work on the same code base  Merge hell, cross team dependencies, ...  Huge monolithic application which is difficult to deploy  Monolith cannot be scaled horizontally  Different parts of the application have totally different requirements  CPU bound  I/O bound  Memory bound  etc.  Some but not all areas of the application change frequently  Development stack is outdated. New tools and patterns are hard if not impossible to embrace
  • 5. How big should a microservice be?  Small enough to fit full context in your head  Big enough to solve a problem  Owned by one team
  • 6. What does “big enough” look like... Some examples:  Lambda: https://github.com/meconlin/lambda-generic-microservice  C#: https://github.com/AFASSoftware/CQRS-Microservices  Spring: https://github.com/kbastani/spring-cloud-microservice-example  akka: https://github.com/theiterators/akka-http-microservice  https://github.com/dustinbarnes/microservice-example
  • 7. How should a microservice communicate?  Synchronous  Asynchronous  Messaging  Fan out  HTTP/REST  TCP/IP  Pub/sub ...but zero logic in the communication pipeline!
  • 8. Are microservices less complex?  Code wise, yes  Deployment wise, yes  Infrastructure configuration wise, no  Dependency management wise, no
  • 10. How to manage microservices? It’s a big world with lots of cutely named tools! • Deploy: Jenkins / TeamCity / Ansible / Chef / Capistrano / StackStorm • Discovery/config: Consul / Consul-Templates / etcd / Registrator / skydns • Containers: Docker / Compose / Vagrant / Otto / Lambda • Container Clustering: ECS / Kubernetes / Mesos / Docker Swarm • Request Routing: Nginx / HAProxy / Kong / API Gateway • Self Healing: Consul / ZooKeeper / Serf • System Health: hystrix, SumoLogic, Nagios, NewRelic, statsd, LogEntries AUTOMATE EVERYTHING
  • 11. Deployment  Continuous Deployment  Continuous Delivery  Versioned  Blue / Green  A-B Testing  Net new, add to routing  Zero downtime Tools: Jenkins / TeamCity / Ansible / Chef / Capistrano / StackStorm NEVER DESTRUCTIVE
  • 12. Service Discovery & Configuration  Minimize known dependencies  No bottlenecks due to outage allowed  Down stream health monitoring  Configuration at deployment time when possible  Configuration in runtime if you have to (adds fragility/degradation) Tools: Consul / Consul-Templates / etcd / Registrator / skydns NO DEPENDENCY KNOWLEDGE
  • 13. Containers & Clustering  Removes “works on my box” story  Installed software dependencies become constrained to your need  No more “servers as pets”  Infrastructure as code becomes a reality  Can deploy to fabric/cluster for better auto scaling story  Serverless truly abstracts hardware from application Tools: Docker / Compose / Vagrant / Otto / Lambda / AWS ECS / Kubernetes / Mesos / Docker Swarm NO HARDWARE DEPENDENCY PREFERRED
  • 14. Request Routing  Public abstraction from internal details  Internal location can become dynamic  Multiple versions of the same thing can be long lived  Makes deployment story more flexible  Live traffic can be drained over  Warming up new instances is possible Tools: Nginx / HAProxy / Kong / API Gateway NEVER EXPOSE YOUR SERVICES DIRECTLY
  • 15. Self Healing It’s not IF it will fail but WHEN it will fail!  Auto healing  Automated Remediation  Circuit breaker  Fallbacks  Graceful degradation  Don’t cascade failures Tools: Consul / ZooKeeper / Serf PLAN FOR FAILURE FIRST
  • 16. System Health  Measure anything, measure everything  https://codeascraft.com/2011/02/15/measure-anything-measure-everything/  Performance monitoring, exception monitoring, logs, metrics  NewRelic, nagios, SumoLogic  statsd / graphite (hosted graphite) / kibana / grafana  Centralized logging (logentries, logstash)  Circuit Breaker (hystrix) Tools: hystrix, SumoLogic, Nagios, NewRelic, statsd, LogEntries VISUALIZE EVERYTHING
  • 20. Questions? James Allen http://www.linkedin.com/in/jamesallenatx Miguel Gonzalez https://www.linkedin.com/in/magonz @doesnotcompile Gabriel Schenker https://www.linkedin.com/in/gabrielschenker @gnschenker Andrew Siemer https://www.linkedin.com/in/andrewsiemer @asiemer