SlideShare a Scribd company logo
1 of 22
Download to read offline
MICROSERVICES
Pros & Cons - Things to Think About
Peter McKee

in/pmckeetx

@pmckee
Miguel Gonzalez

in/magonz

@doesnotcompile
Gabriel Schenker

in/gabrielschenker

@gnschenker
Andrew Siemer

in/andrewsiemer

@asiemer
www.slideshare.net/asiemer/microservices-pros-and-cons-houston-techfest
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
• Monolithic application that 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:
• Docker: https://github.com/docker/docker-birthday-3
• 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
THE SKILL OF THE TEAM
will out weigh any monolith/microservice choice!
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 / cAdvisor

NO HARDWARE DEPENDENCY
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 / Kubernetes

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
QUESTIONS?
Peter McKee

in/pmckeetx

@pmckee
Miguel Gonzalez

in/magonz

@doesnotcompile
Gabriel Schenker

in/gabrielschenker

@gnschenker
Andrew Siemer

in/andrewsiemer

@asiemer
www.slideshare.net/asiemer/microservices-pros-and-cons-houston-techfest

More Related Content

What's hot

What's hot (20)

Creating Event Driven Serverless Applications - Sandeep - Adobe - Serverless ...
Creating Event Driven Serverless Applications - Sandeep - Adobe - Serverless ...Creating Event Driven Serverless Applications - Sandeep - Adobe - Serverless ...
Creating Event Driven Serverless Applications - Sandeep - Adobe - Serverless ...
 
How to avoid microservice pitfalls
How to avoid microservice pitfallsHow to avoid microservice pitfalls
How to avoid microservice pitfalls
 
Reactive Development: Commands, Actors and Events. Oh My!!
Reactive Development: Commands, Actors and Events.  Oh My!!Reactive Development: Commands, Actors and Events.  Oh My!!
Reactive Development: Commands, Actors and Events. Oh My!!
 
gRPC @ Weaveworks
gRPC @ WeaveworksgRPC @ Weaveworks
gRPC @ Weaveworks
 
The Journey from Monolith to Microservices: a Guided Adventure
The Journey from Monolith to Microservices: a Guided AdventureThe Journey from Monolith to Microservices: a Guided Adventure
The Journey from Monolith to Microservices: a Guided Adventure
 
Dos and don'ts in AWS
Dos and don'ts in AWSDos and don'ts in AWS
Dos and don'ts in AWS
 
Serverless Summit India 2017: Fission
Serverless Summit India 2017: FissionServerless Summit India 2017: Fission
Serverless Summit India 2017: Fission
 
Serverless lessons learned #5 retries
Serverless lessons learned #5 retriesServerless lessons learned #5 retries
Serverless lessons learned #5 retries
 
Managing changes to eZPublish Database
Managing changes to eZPublish DatabaseManaging changes to eZPublish Database
Managing changes to eZPublish Database
 
Ben Kehoe - Serverless Architecture for the Internet of Things
Ben Kehoe - Serverless Architecture for the Internet of ThingsBen Kehoe - Serverless Architecture for the Internet of Things
Ben Kehoe - Serverless Architecture for the Internet of Things
 
What's beyond Virtualization - The Future of Cloud Platforms
What's beyond Virtualization - The Future of Cloud PlatformsWhat's beyond Virtualization - The Future of Cloud Platforms
What's beyond Virtualization - The Future of Cloud Platforms
 
Powerful Automation Made Simple
Powerful Automation Made SimplePowerful Automation Made Simple
Powerful Automation Made Simple
 
Donald Ferguson - Old Programmers Can Learn New Tricks
Donald Ferguson - Old Programmers Can Learn New TricksDonald Ferguson - Old Programmers Can Learn New Tricks
Donald Ferguson - Old Programmers Can Learn New Tricks
 
Container Patterns
Container PatternsContainer Patterns
Container Patterns
 
Rob Gruhl and Erik Erikson - What We Learned in 18 Serverless Months at Nords...
Rob Gruhl and Erik Erikson - What We Learned in 18 Serverless Months at Nords...Rob Gruhl and Erik Erikson - What We Learned in 18 Serverless Months at Nords...
Rob Gruhl and Erik Erikson - What We Learned in 18 Serverless Months at Nords...
 
Buzzwords: Microservices, containers and serverless - real life applications ...
Buzzwords: Microservices, containers and serverless - real life applications ...Buzzwords: Microservices, containers and serverless - real life applications ...
Buzzwords: Microservices, containers and serverless - real life applications ...
 
Batten Down the Hatches: A Practical Guide to Securing Kubernetes - RMISC 2019
Batten Down the Hatches: A Practical Guide to Securing Kubernetes - RMISC 2019Batten Down the Hatches: A Practical Guide to Securing Kubernetes - RMISC 2019
Batten Down the Hatches: A Practical Guide to Securing Kubernetes - RMISC 2019
 
Deep dive into Conversational Ai development
Deep dive into Conversational Ai developmentDeep dive into Conversational Ai development
Deep dive into Conversational Ai development
 
Creating Hyper Performant Web Apps with React
Creating Hyper Performant Web Apps with ReactCreating Hyper Performant Web Apps with React
Creating Hyper Performant Web Apps with React
 
Building occasionally connected applications using event sourcing
Building occasionally connected applications using event sourcingBuilding occasionally connected applications using event sourcing
Building occasionally connected applications using event sourcing
 

Viewers also liked

Viewers also liked (7)

Voxxed Days Thesaloniki 2016 - 5 must have patterns for your web-scale micros...
Voxxed Days Thesaloniki 2016 - 5 must have patterns for your web-scale micros...Voxxed Days Thesaloniki 2016 - 5 must have patterns for your web-scale micros...
Voxxed Days Thesaloniki 2016 - 5 must have patterns for your web-scale micros...
 
How to Build Modern Web Applications Using Microservices
How to Build Modern Web Applications Using MicroservicesHow to Build Modern Web Applications Using Microservices
How to Build Modern Web Applications Using Microservices
 
Expressive Microservice Framework Blastoff
Expressive Microservice Framework BlastoffExpressive Microservice Framework Blastoff
Expressive Microservice Framework Blastoff
 
MicroServices on Azure
MicroServices on AzureMicroServices on Azure
MicroServices on Azure
 
Microservices and Azure App Services
Microservices and Azure App ServicesMicroservices and Azure App Services
Microservices and Azure App Services
 
Convert Your Code into a Microservice using AWS Lambda
Convert Your Code into a Microservice using AWS LambdaConvert Your Code into a Microservice using AWS Lambda
Convert Your Code into a Microservice using AWS Lambda
 
There is no such thing as a microservice! (oracle code nyc)
There is no such thing as a microservice! (oracle code nyc)There is no such thing as a microservice! (oracle code nyc)
There is no such thing as a microservice! (oracle code nyc)
 

Similar to Microservices pros and cons - houston tech fest

Building a Smarter Application Stack
Building a Smarter Application StackBuilding a Smarter Application Stack
Building a Smarter Application Stack
Docker, Inc.
 
Docker-N-Beyond
Docker-N-BeyondDocker-N-Beyond
Docker-N-Beyond
santosh007
 
AWS Innovate: Smaller IS Better – Exploiting Microservices on AWS, Craig Dickson
AWS Innovate: Smaller IS Better – Exploiting Microservices on AWS, Craig DicksonAWS Innovate: Smaller IS Better – Exploiting Microservices on AWS, Craig Dickson
AWS Innovate: Smaller IS Better – Exploiting Microservices on AWS, Craig Dickson
Amazon Web Services Korea
 

Similar to Microservices pros and cons - houston tech fest (20)

Microservices pros and cons dark
Microservices pros and cons darkMicroservices pros and cons dark
Microservices pros and cons dark
 
Rami Sayar - Node microservices with Docker
Rami Sayar - Node microservices with DockerRami Sayar - Node microservices with Docker
Rami Sayar - Node microservices with Docker
 
Serverless: The next major shift in cloud computing
Serverless: The next major shift in cloud computingServerless: The next major shift in cloud computing
Serverless: The next major shift in cloud computing
 
Building a smarter application stack - service discovery and wiring for Docker
Building a smarter application stack - service discovery and wiring for DockerBuilding a smarter application stack - service discovery and wiring for Docker
Building a smarter application stack - service discovery and wiring for Docker
 
Building a smarter application Stack by Tomas Doran from Yelp
Building a smarter application Stack by Tomas Doran from YelpBuilding a smarter application Stack by Tomas Doran from Yelp
Building a smarter application Stack by Tomas Doran from Yelp
 
Building a Smarter Application Stack
Building a Smarter Application StackBuilding a Smarter Application Stack
Building a Smarter Application Stack
 
Docker-N-Beyond
Docker-N-BeyondDocker-N-Beyond
Docker-N-Beyond
 
Are you ready for Microservices
Are you ready for MicroservicesAre you ready for Microservices
Are you ready for Microservices
 
Modern software architectures - PHP UK Conference 2015
Modern software architectures - PHP UK Conference 2015Modern software architectures - PHP UK Conference 2015
Modern software architectures - PHP UK Conference 2015
 
The Case Against Microservices
The Case Against MicroservicesThe Case Against Microservices
The Case Against Microservices
 
Grokking microservices in 5 minutes
Grokking microservices in 5 minutesGrokking microservices in 5 minutes
Grokking microservices in 5 minutes
 
Yow Conference Dec 2013 Netflix Workshop Slides with Notes
Yow Conference Dec 2013 Netflix Workshop Slides with NotesYow Conference Dec 2013 Netflix Workshop Slides with Notes
Yow Conference Dec 2013 Netflix Workshop Slides with Notes
 
The Next Big Thing: Serverless
The Next Big Thing: ServerlessThe Next Big Thing: Serverless
The Next Big Thing: Serverless
 
Serverless: The future of application delivery
Serverless: The future of application deliveryServerless: The future of application delivery
Serverless: The future of application delivery
 
Tackling complexity in giant systems: approaches from several cloud providers
Tackling complexity in giant systems: approaches from several cloud providersTackling complexity in giant systems: approaches from several cloud providers
Tackling complexity in giant systems: approaches from several cloud providers
 
AWS Innovate: Smaller IS Better – Exploiting Microservices on AWS, Craig Dickson
AWS Innovate: Smaller IS Better – Exploiting Microservices on AWS, Craig DicksonAWS Innovate: Smaller IS Better – Exploiting Microservices on AWS, Craig Dickson
AWS Innovate: Smaller IS Better – Exploiting Microservices on AWS, Craig Dickson
 
Cloud Native Camel Riding
Cloud Native Camel RidingCloud Native Camel Riding
Cloud Native Camel Riding
 
Introducing to serverless computing and AWS lambda - Israel Clouds Meetup
Introducing to serverless computing and AWS lambda - Israel Clouds MeetupIntroducing to serverless computing and AWS lambda - Israel Clouds Meetup
Introducing to serverless computing and AWS lambda - Israel Clouds Meetup
 
Breaking the Monolith Road to Containers
Breaking the Monolith Road to ContainersBreaking the Monolith Road to Containers
Breaking the Monolith Road to Containers
 
Cloud 2.0: Containers, Microservices and Cloud Hybridization
Cloud 2.0: Containers, Microservices and Cloud HybridizationCloud 2.0: Containers, Microservices and Cloud Hybridization
Cloud 2.0: Containers, Microservices and Cloud Hybridization
 

More from Andrew Siemer

Making your API behave like a big boy
Making your API behave like a big boyMaking your API behave like a big boy
Making your API behave like a big boy
Andrew Siemer
 

More from Andrew Siemer (7)

20 tips for website performance
20 tips for website performance20 tips for website performance
20 tips for website performance
 
Reigniting the Volusion platform
Reigniting the Volusion platformReigniting the Volusion platform
Reigniting the Volusion platform
 
Making your API behave like a big boy
Making your API behave like a big boyMaking your API behave like a big boy
Making your API behave like a big boy
 
Load testing with Visual Studio and Azure - Andrew Siemer
Load testing with Visual Studio and Azure - Andrew SiemerLoad testing with Visual Studio and Azure - Andrew Siemer
Load testing with Visual Studio and Azure - Andrew Siemer
 
Test driving Azure Search and DocumentDB
Test driving Azure Search and DocumentDBTest driving Azure Search and DocumentDB
Test driving Azure Search and DocumentDB
 
A tale of two clouds
A tale of two cloudsA tale of two clouds
A tale of two clouds
 
Introduction to CQRS - command and query responsibility segregation
Introduction to CQRS - command and query responsibility segregationIntroduction to CQRS - command and query responsibility segregation
Introduction to CQRS - command and query responsibility segregation
 

Recently uploaded

Famous Kala Jadu, Black magic specialist in Lahore and Kala ilam expert in ka...
Famous Kala Jadu, Black magic specialist in Lahore and Kala ilam expert in ka...Famous Kala Jadu, Black magic specialist in Lahore and Kala ilam expert in ka...
Famous Kala Jadu, Black magic specialist in Lahore and Kala ilam expert in ka...
baharayali
 
Jual Obat Aborsi Ponorogo ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Ponorogo ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Ponorogo ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Ponorogo ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 
Real Kala Jadu, Black magic specialist in Lahore and Kala ilam expert in kara...
Real Kala Jadu, Black magic specialist in Lahore and Kala ilam expert in kara...Real Kala Jadu, Black magic specialist in Lahore and Kala ilam expert in kara...
Real Kala Jadu, Black magic specialist in Lahore and Kala ilam expert in kara...
baharayali
 
Top 10 Amil baba list Famous Amil baba In Pakistan Amil baba Kala jadu in Raw...
Top 10 Amil baba list Famous Amil baba In Pakistan Amil baba Kala jadu in Raw...Top 10 Amil baba list Famous Amil baba In Pakistan Amil baba Kala jadu in Raw...
Top 10 Amil baba list Famous Amil baba In Pakistan Amil baba Kala jadu in Raw...
Amil Baba Naveed Bangali
 
Popular Kala Jadu, Kala ilam specialist in USA and Bangali Amil baba in Saudi...
Popular Kala Jadu, Kala ilam specialist in USA and Bangali Amil baba in Saudi...Popular Kala Jadu, Kala ilam specialist in USA and Bangali Amil baba in Saudi...
Popular Kala Jadu, Kala ilam specialist in USA and Bangali Amil baba in Saudi...
baharayali
 
Famous No -1 amil baba in Hyderabad ! Best No _ Astrologer in Pakistan, UK, A...
Famous No -1 amil baba in Hyderabad ! Best No _ Astrologer in Pakistan, UK, A...Famous No -1 amil baba in Hyderabad ! Best No _ Astrologer in Pakistan, UK, A...
Famous No -1 amil baba in Hyderabad ! Best No _ Astrologer in Pakistan, UK, A...
No -1 Astrologer ,Amil Baba In Australia | Uk | Usa | Canada | Pakistan
 

Recently uploaded (20)

Christian Charism Ministry - Manifestation of spiritual gifts within the chur...
Christian Charism Ministry - Manifestation of spiritual gifts within the chur...Christian Charism Ministry - Manifestation of spiritual gifts within the chur...
Christian Charism Ministry - Manifestation of spiritual gifts within the chur...
 
"The Magnificent Surah Rahman: PDF Version"
"The Magnificent Surah Rahman: PDF Version""The Magnificent Surah Rahman: PDF Version"
"The Magnificent Surah Rahman: PDF Version"
 
Famous Kala Jadu, Black magic specialist in Lahore and Kala ilam expert in ka...
Famous Kala Jadu, Black magic specialist in Lahore and Kala ilam expert in ka...Famous Kala Jadu, Black magic specialist in Lahore and Kala ilam expert in ka...
Famous Kala Jadu, Black magic specialist in Lahore and Kala ilam expert in ka...
 
Codex Singularity: Search for the Prisca Sapientia
Codex Singularity: Search for the Prisca SapientiaCodex Singularity: Search for the Prisca Sapientia
Codex Singularity: Search for the Prisca Sapientia
 
About Kabala (English) | Kabastro.com | Kabala.vn
About Kabala (English) | Kabastro.com | Kabala.vnAbout Kabala (English) | Kabastro.com | Kabala.vn
About Kabala (English) | Kabastro.com | Kabala.vn
 
The_Chronological_Life_of_Christ_Part_99_Words_and_Works
The_Chronological_Life_of_Christ_Part_99_Words_and_WorksThe_Chronological_Life_of_Christ_Part_99_Words_and_Works
The_Chronological_Life_of_Christ_Part_99_Words_and_Works
 
The Revelation Chapter 4 Working Copy.docx
The Revelation Chapter 4 Working Copy.docxThe Revelation Chapter 4 Working Copy.docx
The Revelation Chapter 4 Working Copy.docx
 
A Spiritual Guide To Truth v10.pdf xxxxxxx
A Spiritual Guide To Truth v10.pdf xxxxxxxA Spiritual Guide To Truth v10.pdf xxxxxxx
A Spiritual Guide To Truth v10.pdf xxxxxxx
 
Zulu - The Epistle of Ignatius to Polycarp.pdf
Zulu - The Epistle of Ignatius to Polycarp.pdfZulu - The Epistle of Ignatius to Polycarp.pdf
Zulu - The Epistle of Ignatius to Polycarp.pdf
 
St. Louise de Marillac and Care of the Sick Poor
St. Louise de Marillac and Care of the Sick PoorSt. Louise de Marillac and Care of the Sick Poor
St. Louise de Marillac and Care of the Sick Poor
 
Jual Obat Aborsi Ponorogo ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Ponorogo ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Ponorogo ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Ponorogo ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Real Kala Jadu, Black magic specialist in Lahore and Kala ilam expert in kara...
Real Kala Jadu, Black magic specialist in Lahore and Kala ilam expert in kara...Real Kala Jadu, Black magic specialist in Lahore and Kala ilam expert in kara...
Real Kala Jadu, Black magic specialist in Lahore and Kala ilam expert in kara...
 
Top 10 Amil baba list Famous Amil baba In Pakistan Amil baba Kala jadu in Raw...
Top 10 Amil baba list Famous Amil baba In Pakistan Amil baba Kala jadu in Raw...Top 10 Amil baba list Famous Amil baba In Pakistan Amil baba Kala jadu in Raw...
Top 10 Amil baba list Famous Amil baba In Pakistan Amil baba Kala jadu in Raw...
 
Amil baba in Lahore /Amil baba in Karachi /Amil baba in Pakistan
Amil baba in Lahore /Amil baba in Karachi /Amil baba in PakistanAmil baba in Lahore /Amil baba in Karachi /Amil baba in Pakistan
Amil baba in Lahore /Amil baba in Karachi /Amil baba in Pakistan
 
St. Louise de Marillac and Poor Children
St. Louise de Marillac and Poor ChildrenSt. Louise de Marillac and Poor Children
St. Louise de Marillac and Poor Children
 
NoHo First Good News online newsletter May 2024
NoHo First Good News online newsletter May 2024NoHo First Good News online newsletter May 2024
NoHo First Good News online newsletter May 2024
 
Deerfoot Church of Christ Bulletin 5 12 24
Deerfoot Church of Christ Bulletin 5 12 24Deerfoot Church of Christ Bulletin 5 12 24
Deerfoot Church of Christ Bulletin 5 12 24
 
Popular Kala Jadu, Kala ilam specialist in USA and Bangali Amil baba in Saudi...
Popular Kala Jadu, Kala ilam specialist in USA and Bangali Amil baba in Saudi...Popular Kala Jadu, Kala ilam specialist in USA and Bangali Amil baba in Saudi...
Popular Kala Jadu, Kala ilam specialist in USA and Bangali Amil baba in Saudi...
 
Legends of the Light v2.pdf xxxxxxxxxxxxx
Legends of the Light v2.pdf xxxxxxxxxxxxxLegends of the Light v2.pdf xxxxxxxxxxxxx
Legends of the Light v2.pdf xxxxxxxxxxxxx
 
Famous No -1 amil baba in Hyderabad ! Best No _ Astrologer in Pakistan, UK, A...
Famous No -1 amil baba in Hyderabad ! Best No _ Astrologer in Pakistan, UK, A...Famous No -1 amil baba in Hyderabad ! Best No _ Astrologer in Pakistan, UK, A...
Famous No -1 amil baba in Hyderabad ! Best No _ Astrologer in Pakistan, UK, A...
 

Microservices pros and cons - houston tech fest

  • 1. MICROSERVICES Pros & Cons - Things to Think About
  • 2. Peter McKee
 in/pmckeetx
 @pmckee Miguel Gonzalez
 in/magonz
 @doesnotcompile Gabriel Schenker
 in/gabrielschenker
 @gnschenker Andrew Siemer
 in/andrewsiemer
 @asiemer www.slideshare.net/asiemer/microservices-pros-and-cons-houston-techfest
  • 3. 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
  • 4. 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
  • 5. 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 • Monolithic application that 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
  • 6. 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
  • 7. WHAT DOES “BIG ENOUGH” LOOK LIKE... Some examples: • Docker: https://github.com/docker/docker-birthday-3 • 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
  • 8. HOW SHOULD A MICROSERVICE COMMUNICATE? • Synchronous • Asynchronous • Messaging • Fan out • HTTP/REST • TCP/IP • Pub/sub
 ...but zero logic in the communication pipeline!
  • 9. ARE MICROSERVICES LESS COMPLEX? • Code wise, yes • Deployment wise, yes
 
 • Infrastructure 
 configuration wise, no • Dependency management
 wise, no
  • 10. THE SKILL OF THE TEAM will out weigh any monolith/microservice choice!
  • 12. 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
  • 13. 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
  • 14. 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
  • 15. 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 / cAdvisor
 NO HARDWARE DEPENDENCY
  • 16. 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 / Kubernetes
 NEVER EXPOSE YOUR SERVICES DIRECTLY
  • 17. 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
  • 18. 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.
  • 21.
  • 22. QUESTIONS? Peter McKee
 in/pmckeetx
 @pmckee Miguel Gonzalez
 in/magonz
 @doesnotcompile Gabriel Schenker
 in/gabrielschenker
 @gnschenker Andrew Siemer
 in/andrewsiemer
 @asiemer www.slideshare.net/asiemer/microservices-pros-and-cons-houston-techfest