SlideShare ist ein Scribd-Unternehmen logo
1 von 25
Downloaden Sie, um offline zu lesen
Microservice 
Architecture 
Engin Yöyen 
November, 2014
What is a microservice? 
… is a small, discrete, isolated, lightweight 
application that is stateless service and can be 
deployed separately.
What is a monolith? 
… is a single unit of application, which all the 
business logic and data access code are combined 
into a single application.
Microservice vs Monolith?
Call Center 
• Agents : Current available agents 
• Calls : Current calls with details such customer, 
length of call, agent 
• Statistics : Current number of calls per day 
• Monitoring : Failing calls, connections, etc.
This is how does it look like!
And this is how you scale! 
…of course, more work involved!
Comparison 
Monolith Microservice 
Update and Feature 
Delivery 
new features takes time 
to implement 
easy to understand 
easy to implement 
Deployment not frequent but easy 
frequent but 
orchestration can be 
challanging 
Isolation 
errors can have effect 
on entire system 
error has effect only on 
particular services 
Response Time Process call (Faster) API Call (Slower)
Comparison (2) 
Monolith Microservice 
New Developers 
Long learning curve 
(understanding 
application) 
Long learning curve 
(understanding 
architecture) 
Technology 
Standardization on 
single technology 
Choice of technology 
based on problem 
Testing Relatively Simple 
Complexity of 
distributed systems 
Development Tools 
(IDE) 
Larger the code base 
slower the IDE gets 
Not an issue
Characteristics of 
Microservice Architecture
Single Responsibility 
• Single Responsibility Principle : Do one thing, but 
do it well 
• a responsibility = a reason for change 
• How small is small? Size does not matter! 
• Line of code(LOC) is not a good measurement, 
depends on language, on developer.
Stateless 
• Each request as an independent transaction 
• Persist your data!
Data Management
Data Management 
Each service can have it’s own data store, and it can be different technology
Communication between 
services 
• HTTP (Request, Response) 
• Message Queue (e.g. RabbitMQ, zeroMQ ) 
• Don’t Reinvent The Wheel. Use 
• HTTP Status Code 
• HTTP Headers 
• REST (Not just the url also the body)
Deployment 
• Each service has its own 
• Repository 
• Build Pipeline 
• Host 
• Build single artifact that represent release candidate. Do not 
build artifact for different environment 
• Manage configuration separately 
• Can we provision a server less than 1 minute?
Deployment 
Source : http://www.slideshare.net/fasgoncalves/hypervisor-versus-linux-containers
Deployment : Image 
Management 
Source : https://www.joyent.com/developers/image-management/
IT Configuration and 
Automation 
• Don’t do anything manually on any of your servers 
• Good understanding of IT Automation and tools 
(e.g. Ansible, Chef, Salt, Puppet) 
• Flexibility to build and deploy new services 
• You Build It, You Run It!
Testing 
Source : http://lisacrispin.com/2011/11/08/using-the-agile-testing-quadrants/
Testing 
• Test different scope, 
for different purposes 
• Higher the pyramid, 
shorter the feedback cycle 
Source : http://www.thoughtworks.com/insights/blog/ 
introducing-software-testing-cupcake-anti-pattern 
• End-to-End tests are not easy for microservices 
• Team structure, who writes the test 
• Testing multiple microservices 
• Network issues, time-to-complete
Monitoring 
• Monitor your host and individual services 
• Check health of your system 
• Keep track of your logs 
• Build and use conventions (e.g. Standardise your 
logs) 
• Use existing tools: ElasticSearch, Kibana, Graphite, 
Logstash,
Metrics 
• Response time 
• Error Rate 
• Correlation ID
The Company Culture 
• Decentralized Governance: Right tool for right job 
• Open enough to change and adopt 
• Cross functional teams (e.g. for testing, operations)
Questions

Weitere ähnliche Inhalte

Was ist angesagt?

A journey from monolith to micro services
A journey from monolith to micro servicesA journey from monolith to micro services
A journey from monolith to micro services
Pravin Mishra
 

Was ist angesagt? (20)

Microservices Architecture
Microservices ArchitectureMicroservices Architecture
Microservices Architecture
 
Migrating .NET Apps to CF, A Strategy for Enterprises
Migrating .NET Apps to CF, A Strategy for EnterprisesMigrating .NET Apps to CF, A Strategy for Enterprises
Migrating .NET Apps to CF, A Strategy for Enterprises
 
Sicurezza integrate nella tua piattaforma Cloud-Native con VMware NSX (Pivota...
Sicurezza integrate nella tua piattaforma Cloud-Native con VMware NSX (Pivota...Sicurezza integrate nella tua piattaforma Cloud-Native con VMware NSX (Pivota...
Sicurezza integrate nella tua piattaforma Cloud-Native con VMware NSX (Pivota...
 
Microservice intro
Microservice introMicroservice intro
Microservice intro
 
Do You Need A Service Mesh?
Do You Need A Service Mesh?Do You Need A Service Mesh?
Do You Need A Service Mesh?
 
Understanding MicroSERVICE Architecture with Java & Spring Boot
Understanding MicroSERVICE Architecture with Java & Spring BootUnderstanding MicroSERVICE Architecture with Java & Spring Boot
Understanding MicroSERVICE Architecture with Java & Spring Boot
 
Pivotal Container Service il modo più semplice per gestire Kubernetes in azie...
Pivotal Container Service il modo più semplice per gestire Kubernetes in azie...Pivotal Container Service il modo più semplice per gestire Kubernetes in azie...
Pivotal Container Service il modo più semplice per gestire Kubernetes in azie...
 
Lo Scenario Cloud-Native (Pivotal Cloud-Native Workshop: Milan)
Lo Scenario Cloud-Native (Pivotal Cloud-Native Workshop: Milan)Lo Scenario Cloud-Native (Pivotal Cloud-Native Workshop: Milan)
Lo Scenario Cloud-Native (Pivotal Cloud-Native Workshop: Milan)
 
Microservices Architecture
Microservices ArchitectureMicroservices Architecture
Microservices Architecture
 
Micro services and Containers
Micro services and ContainersMicro services and Containers
Micro services and Containers
 
Microservices architecture
Microservices architectureMicroservices architecture
Microservices architecture
 
Cloud Native Application
Cloud Native ApplicationCloud Native Application
Cloud Native Application
 
Eseguire Applicazioni Cloud-Native con Pivotal Cloud Foundry su Google Cloud ...
Eseguire Applicazioni Cloud-Native con Pivotal Cloud Foundry su Google Cloud ...Eseguire Applicazioni Cloud-Native con Pivotal Cloud Foundry su Google Cloud ...
Eseguire Applicazioni Cloud-Native con Pivotal Cloud Foundry su Google Cloud ...
 
Why modern cloud infrastructure require automation
Why modern cloud infrastructure require automationWhy modern cloud infrastructure require automation
Why modern cloud infrastructure require automation
 
Microservice architecture
Microservice architectureMicroservice architecture
Microservice architecture
 
A journey from monolith to micro services
A journey from monolith to micro servicesA journey from monolith to micro services
A journey from monolith to micro services
 
How to Migrate to Cloud with Complete Confidence and Trust
How to Migrate to Cloud with Complete Confidence and TrustHow to Migrate to Cloud with Complete Confidence and Trust
How to Migrate to Cloud with Complete Confidence and Trust
 
Orchestrating Cloud-Native and Traditional Application Architectures
Orchestrating Cloud-Native and Traditional Application ArchitecturesOrchestrating Cloud-Native and Traditional Application Architectures
Orchestrating Cloud-Native and Traditional Application Architectures
 
Domain-driven Design
Domain-driven DesignDomain-driven Design
Domain-driven Design
 
Navigating the service mesh landscape with Istio, Consul Connect, and Linkerd
Navigating the service mesh landscape with Istio, Consul Connect, and LinkerdNavigating the service mesh landscape with Istio, Consul Connect, and Linkerd
Navigating the service mesh landscape with Istio, Consul Connect, and Linkerd
 

Andere mochten auch

Automated Abstraction of Flow of Control in a System of Distributed Software...
Automated Abstraction of Flow of Control in a System of Distributed  Software...Automated Abstraction of Flow of Control in a System of Distributed  Software...
Automated Abstraction of Flow of Control in a System of Distributed Software...
nimak
 

Andere mochten auch (20)

MeetMagento 2015 - Argentina - Think Performance
MeetMagento 2015 - Argentina - Think PerformanceMeetMagento 2015 - Argentina - Think Performance
MeetMagento 2015 - Argentina - Think Performance
 
Scaling an eCommerce environment
Scaling an eCommerce environmentScaling an eCommerce environment
Scaling an eCommerce environment
 
Successful online selling - Strategies for Offline Brands and Retailers
Successful online selling - Strategies for Offline Brands and RetailersSuccessful online selling - Strategies for Offline Brands and Retailers
Successful online selling - Strategies for Offline Brands and Retailers
 
Testing microservice-architecture-qe
Testing microservice-architecture-qeTesting microservice-architecture-qe
Testing microservice-architecture-qe
 
LiveCoding
LiveCodingLiveCoding
LiveCoding
 
Principles of Modern Application Architecture
Principles of Modern Application ArchitecturePrinciples of Modern Application Architecture
Principles of Modern Application Architecture
 
Automated Abstraction of Flow of Control in a System of Distributed Software...
Automated Abstraction of Flow of Control in a System of Distributed  Software...Automated Abstraction of Flow of Control in a System of Distributed  Software...
Automated Abstraction of Flow of Control in a System of Distributed Software...
 
Microservices architecture
Microservices architectureMicroservices architecture
Microservices architecture
 
Antifragility and testing for distributed systems failure
Antifragility and testing for distributed systems failureAntifragility and testing for distributed systems failure
Antifragility and testing for distributed systems failure
 
Building A Distributed Build System at Google Scale (StrangeLoop 2016)
Building A Distributed Build System at Google Scale (StrangeLoop 2016)Building A Distributed Build System at Google Scale (StrangeLoop 2016)
Building A Distributed Build System at Google Scale (StrangeLoop 2016)
 
Monitoring docker containers and dockerized applications
Monitoring docker containers and dockerized applicationsMonitoring docker containers and dockerized applications
Monitoring docker containers and dockerized applications
 
Measuring Micro-services. Richard Rodger
Measuring Micro-services. Richard RodgerMeasuring Micro-services. Richard Rodger
Measuring Micro-services. Richard Rodger
 
Monitoring Docker containers - Docker NYC Feb 2015
Monitoring Docker containers - Docker NYC Feb 2015Monitoring Docker containers - Docker NYC Feb 2015
Monitoring Docker containers - Docker NYC Feb 2015
 
ContainerDays NYC 2016: "Observability and Manageability in a Container Envir...
ContainerDays NYC 2016: "Observability and Manageability in a Container Envir...ContainerDays NYC 2016: "Observability and Manageability in a Container Envir...
ContainerDays NYC 2016: "Observability and Manageability in a Container Envir...
 
Voxxed Days Thessaloniki 2016 - Microservices in production
Voxxed Days Thessaloniki 2016 - Microservices in productionVoxxed Days Thessaloniki 2016 - Microservices in production
Voxxed Days Thessaloniki 2016 - Microservices in production
 
Continous Integration: A Case Study
Continous Integration: A Case StudyContinous Integration: A Case Study
Continous Integration: A Case Study
 
2008 "An overview of Methods for analysis of Identifiability and Observabilit...
2008 "An overview of Methods for analysis of Identifiability and Observabilit...2008 "An overview of Methods for analysis of Identifiability and Observabilit...
2008 "An overview of Methods for analysis of Identifiability and Observabilit...
 
BFF Pattern in Action: SoundCloud’s Microservices
BFF Pattern in Action: SoundCloud’s MicroservicesBFF Pattern in Action: SoundCloud’s Microservices
BFF Pattern in Action: SoundCloud’s Microservices
 
Cloud Adoption in the Enterprise
Cloud Adoption in the EnterpriseCloud Adoption in the Enterprise
Cloud Adoption in the Enterprise
 
Spring Cloud Contract And Your Microservice Architecture
Spring Cloud Contract And Your Microservice ArchitectureSpring Cloud Contract And Your Microservice Architecture
Spring Cloud Contract And Your Microservice Architecture
 

Ähnlich wie Microservice Architecture

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
 

Ähnlich wie Microservice Architecture (20)

Think Big - Build Small
Think Big - Build SmallThink Big - Build Small
Think Big - Build Small
 
DCEU 18: From Monolith to Microservices
DCEU 18: From Monolith to MicroservicesDCEU 18: From Monolith to Microservices
DCEU 18: From Monolith to Microservices
 
Monitoring Containerized Micro-Services In Azure
Monitoring Containerized Micro-Services In AzureMonitoring Containerized Micro-Services In Azure
Monitoring Containerized Micro-Services In Azure
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
 
Do I Need A Service Mesh.pptx
Do I Need A Service Mesh.pptxDo I Need A Service Mesh.pptx
Do I Need A Service Mesh.pptx
 
Understanding Microservices
Understanding Microservices Understanding Microservices
Understanding Microservices
 
Microservices: Yes or not?
Microservices: Yes or not?Microservices: Yes or not?
Microservices: Yes or not?
 
Grokking microservices in 5 minutes
Grokking microservices in 5 minutesGrokking microservices in 5 minutes
Grokking microservices in 5 minutes
 
DevOps and Microservice
DevOps and MicroserviceDevOps and Microservice
DevOps and Microservice
 
Mobile app-and-microservices-with-ibm-cloud
Mobile app-and-microservices-with-ibm-cloudMobile app-and-microservices-with-ibm-cloud
Mobile app-and-microservices-with-ibm-cloud
 
QCon 2015 - Microservices Track Notes
QCon 2015 - Microservices Track Notes QCon 2015 - Microservices Track Notes
QCon 2015 - Microservices Track Notes
 
Pros & Cons of Microservices Architecture
Pros & Cons of Microservices ArchitecturePros & Cons of Microservices Architecture
Pros & Cons of Microservices Architecture
 
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
 
Testing the Migration of Monolithic Applications to Microservices on the Cloud
Testing the Migration of Monolithic Applications to Microservices on the CloudTesting the Migration of Monolithic Applications to Microservices on the Cloud
Testing the Migration of Monolithic Applications to Microservices on the Cloud
 
MicroserviceArchitecture in detail over Monolith.
MicroserviceArchitecture in detail over Monolith.MicroserviceArchitecture in detail over Monolith.
MicroserviceArchitecture in detail over Monolith.
 
What serverless means for enterprise apps
What serverless means for enterprise appsWhat serverless means for enterprise apps
What serverless means for enterprise apps
 
Building front-end apps that Scale - FOSDEM 2014
Building front-end apps that Scale - FOSDEM 2014Building front-end apps that Scale - FOSDEM 2014
Building front-end apps that Scale - FOSDEM 2014
 
Microservices: The Best Practices
Microservices: The Best PracticesMicroservices: The Best Practices
Microservices: The Best Practices
 
Disruptive Trends in Application Development
Disruptive Trends in Application DevelopmentDisruptive Trends in Application Development
Disruptive Trends in Application Development
 
AWS Summit Auckland - Smaller is Better - Microservices on AWS
AWS Summit Auckland - Smaller is Better - Microservices on AWSAWS Summit Auckland - Smaller is Better - Microservices on AWS
AWS Summit Auckland - Smaller is Better - Microservices on AWS
 

Kürzlich hochgeladen

%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
masabamasaba
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 

Kürzlich hochgeladen (20)

WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the Situation
 

Microservice Architecture

  • 1. Microservice Architecture Engin Yöyen November, 2014
  • 2. What is a microservice? … is a small, discrete, isolated, lightweight application that is stateless service and can be deployed separately.
  • 3. What is a monolith? … is a single unit of application, which all the business logic and data access code are combined into a single application.
  • 5. Call Center • Agents : Current available agents • Calls : Current calls with details such customer, length of call, agent • Statistics : Current number of calls per day • Monitoring : Failing calls, connections, etc.
  • 6. This is how does it look like!
  • 7. And this is how you scale! …of course, more work involved!
  • 8. Comparison Monolith Microservice Update and Feature Delivery new features takes time to implement easy to understand easy to implement Deployment not frequent but easy frequent but orchestration can be challanging Isolation errors can have effect on entire system error has effect only on particular services Response Time Process call (Faster) API Call (Slower)
  • 9. Comparison (2) Monolith Microservice New Developers Long learning curve (understanding application) Long learning curve (understanding architecture) Technology Standardization on single technology Choice of technology based on problem Testing Relatively Simple Complexity of distributed systems Development Tools (IDE) Larger the code base slower the IDE gets Not an issue
  • 11. Single Responsibility • Single Responsibility Principle : Do one thing, but do it well • a responsibility = a reason for change • How small is small? Size does not matter! • Line of code(LOC) is not a good measurement, depends on language, on developer.
  • 12. Stateless • Each request as an independent transaction • Persist your data!
  • 14. Data Management Each service can have it’s own data store, and it can be different technology
  • 15. Communication between services • HTTP (Request, Response) • Message Queue (e.g. RabbitMQ, zeroMQ ) • Don’t Reinvent The Wheel. Use • HTTP Status Code • HTTP Headers • REST (Not just the url also the body)
  • 16. Deployment • Each service has its own • Repository • Build Pipeline • Host • Build single artifact that represent release candidate. Do not build artifact for different environment • Manage configuration separately • Can we provision a server less than 1 minute?
  • 17. Deployment Source : http://www.slideshare.net/fasgoncalves/hypervisor-versus-linux-containers
  • 18. Deployment : Image Management Source : https://www.joyent.com/developers/image-management/
  • 19. IT Configuration and Automation • Don’t do anything manually on any of your servers • Good understanding of IT Automation and tools (e.g. Ansible, Chef, Salt, Puppet) • Flexibility to build and deploy new services • You Build It, You Run It!
  • 20. Testing Source : http://lisacrispin.com/2011/11/08/using-the-agile-testing-quadrants/
  • 21. Testing • Test different scope, for different purposes • Higher the pyramid, shorter the feedback cycle Source : http://www.thoughtworks.com/insights/blog/ introducing-software-testing-cupcake-anti-pattern • End-to-End tests are not easy for microservices • Team structure, who writes the test • Testing multiple microservices • Network issues, time-to-complete
  • 22. Monitoring • Monitor your host and individual services • Check health of your system • Keep track of your logs • Build and use conventions (e.g. Standardise your logs) • Use existing tools: ElasticSearch, Kibana, Graphite, Logstash,
  • 23. Metrics • Response time • Error Rate • Correlation ID
  • 24. The Company Culture • Decentralized Governance: Right tool for right job • Open enough to change and adopt • Cross functional teams (e.g. for testing, operations)