SlideShare uma empresa Scribd logo
1 de 49
Baixar para ler offline
Creating a Microservice?
Answer These 10 Questions First.
Brian Kelly, VP Engineering, Datawire
DevOpsDays Austin, May 2nd 2016
@brikelly
bkelly@datawire.io
datawire.io
Hi!
Me
* Working in distributed systems most of my career
* Built a number of middleware and messaging products
* Strangled a SaaS monolith with microservices
Datawire
* Based in Boston and San Francisco
* We provide technology for companies adopting microservices
* We’ve spent a lot of time with the master microservices practitioners
from high-growth technology companies
datawire.io
Microservices increase development velocity
DevOps increases release velocity
For organizations scaling rapidly, doing one without the
other is…“suboptimal”
Microservices and DevOps:
A Perfect Match
datawire.io 4
A microservice is deliberately simple on the inside
It’s what’s outside that’s hard
datawire.io 5
“There are only two hard problems in distributed systems:
1. Exactly-once delivery
2. Guaranteed order of messages
1. Exactly-once delivery”
@mathiasverraes
datawire.io
Force awareness in your teams of latent concerns
* For example, potential future issues with scalability and reliability
It’s OK to not have sophisticated answers for each question
* But asking them is important!
Why Ask These 10 Questions?
datawire.io 7
Organization
DevelopmentArchitecture
Categories
datawire.io 8
Organization
1. Have you invested enough in developer infrastructure?
datawire.io 9
Developer Infrastructure Teams
The dev infrastructure team focuses on
developer education, core infrastructure, and
driving standards through a great DX.
datawire.io 10
Investing in the core infrastructure necessary for
independent iteration is key
Continuous
delivery workflow
Loosely coupled
services
Application
resilience
datawire.io 11
2. How will your new service be deployed and upgraded?
Organization
datawire.io
Bake
Docker
Packer
Deploy
AWS
Cloud Foundry
Docker
GCP
Kubernetes
Mesos
Microso! Azure
Build
Circle CI
Go.cd
JFrog
Jenkins
Travis
Define
DatawireQuark
Finagle/Thri!
HTTP/JSON
gRPC/Protobuf
Monitor
AppDynamics
DataDog
InfluxData
Nagios
New Relic
SignalFX
Sysdig
Wavefront
Zipkin
Connect
Datawire Connect
Homegrown
Hystrix / RIbbon
SmartStack
DevOps
Development
Build
andpackagethecode/
contractintoasource
artifact
GitHub /
Source
JAR, Gem,
npm
AMI,
Container,
VM
Microservice
Define
thecontract(API,data
format,protocol)
thebusinesslogic
Code
Connect
themicroservicetoother
microservices
Monitor
thehealthofthedeployed
microservice
Deploy
theartifacttorunonthe
appropriatecompute
resources
theapplication&
dependenciesintodeploy-
ableartifact
Bake Automated DevOps workflow: Spinnaker
12
Our Model
datawire.io 13
Continuous
delivery workflow
1. Workflow needs to be defined but
does not need to be fully automated.
Increase automation as the number of
microservices grows.
2. Need to have service running in
production in order to fully test.
Quickly move from commit to customer
datawire.io 14
Each upgrade is an opportunity to break the contract between your new
service and any other dependent services
Plenty of techniques exist for mitigating the chance of failure:
* Well-specified structural and behavioral service contracts
* Dark launching for examining the effect of prod traffic without risk
* Response diff’ing for ensuring contract compliance
* Canary testing for progressive rollout
* Blue/Green deployment for fast rollback
Upgrading your Service
datawire.io 15
3. How will it be monitored and measured?
Organization
datawire.io 16
Ways of monitoring your service’s health:
OK:
* Health check from monitor to service (GET /health from an ELB)
Better:
* “Call Home” health check from service to monitor (APM approach)
Best:
* The client’s experience calling real APIs on the service
Monitoring and Measuring your Service
datawire.io 17
Which service is introducing the
maximum latency into a request?
Which service is the root cause of a
cascade failure?
Monitor the traffic, not just the services
Diagnosis
datawire.io 18
4. How will it be tested?
Development
datawire.io 19
Unit testing a single service is the easy part
What’s harder: testing the entire system
How will a developer verify that their changes to a single microservice
will not break other parts of the system?
Staging environments bring a little comfort, but add significant cost,
complexity, and distractions
Testing
datawire.io 20
Test before launch
Mock services
Sophisticated deployment
workflows
Automated regression tests
Test after launch
Dark launch
Canary testing
Blue / green deployment
Microservice Testing Is Required on Both Sides of Deployment
Reduce probability of failure Reduce impact of failure
datawire.io 21
5. How will it be secured?
Development
datawire.io 22
Most likely type of attack vectors:
* Exploitation of OWASP Top 10 vulnerabilities in your web application
* Internal staff with existing access
* Social engineering
Less likely type of attack vector:
* Attacker gains access behind your perimeter, logs on to your containers,
reverse-engineers your internal service APIs, sends fake requests to and from
each microservice
Prioritize Potential Attack Vectors
datawire.io 23
6. How will it be configured?
Development
datawire.io 24
“Configuration” can be categorized:
• Static configuration (log file locations, ports to listen on, …)
• Runtime configuration (thread pool sizes, JVM heap size, …)
• Behavioral configuration (feature flags, request routing rules, …)
Configuration
datawire.io 25
Prevent arbitrary static configuration changes to production systems
* Instead, deploy those changes into new immutable, copy-on-write
containers
Strive for adaptive, elastic services that require zero dynamic configuration
changes at runtime to stay healthy
Reserve behavioral configuration for progressive rollouts, dark launching,
routing
Configuration
datawire.io 26
7. How will it be consumed by the rest of the system?
Architecture
datawire.io 27
Your new microservice will provide new value to the rest of the system
But will it offer an SLA for its latency, uptime, and reliability?
Those who consume it will appreciate it:
• They can specify timeouts and trip circuit breakers when response latency is high
• They will know which operations are idempotent
• They could cache some responses for large queries
• They can spot uptime SLA discrepancies
Datawire’s Quark is an IDL that captures both structure and behavior
Your microservice needs a contract
datawire.io 28
Structural vs. Behavioral Contracts
Structural:
Intended for Tools
datawire.io 29
Structural vs. Behavioral Contracts
Behavioral:
Intended for Humans
Structural:
Intended for Tools
datawire.io 30
8. How will it be discovered?
Architecture
datawire.io 31
The simpler your discovery system, the less flexibility it offers.
DNS schemes: very simple, but don’t take into account availability, also
makes the developer experience difficult
Strongly consistent datastores (e.g. Zookeeper): more flexible, but don’t
handle network partitions at all
Eventually consistent datastores with pub/sub (e.g. Datawire Connect):
very flexible, handles partitions well, clients and services unaffected even
when they can’t reach the discovery system
Service Discovery
datawire.io 32
9. How will it scale?
Architecture
datawire.io 33
9. How will it scale?
Architecture
datawire.io 34
9. How will it fail to scale?
Architecture
datawire.io
Node
NodeNode
35
What will be the sequence of failures in the
event of a large increase in traffic?
* Example sequence: First the database maxes out, then RAM,
then CPU, then file descriptors, then ELBs, then NICs
Awareness of the likely failure sequence will
help you be aware of your headroom and help
build a plan for capacity growth
Knowing your Chokepoint Sequence
NodeNode
NodeCassandra Cassandra Cassandra
NodeHAProxy HAProxy
NodeNode
datawire.io
Node
NodeNode
36
What will be the sequence of failures in the
event of a large increase in traffic?
* Example sequence: First the database maxes out, then RAM,
then CPU, then file descriptors, then ELBs, then NICs
Awareness of the likely failure sequence will
help you be aware of your headroom and help
build a plan for capacity growth
Knowing your Chokepoint Sequence
NodeNode
NodeCassandra Cassandra Cassandra
NodeHAProxy HAProxy
NodeNode
datawire.io
NodeNode
Node
37
What will be the sequence of failures in the
event of a large increase in traffic?
* Example sequence: First the database maxes out, then RAM,
then CPU, then file descriptors, then ELBs, then NICs
Awareness of the likely failure sequence will
help you be aware of your headroom and help
build a plan for capacity growth
Knowing your Chokepoint Sequence
NodeNode
NodeCassandra Cassandra Cassandra
NodeHAProxy HAProxy
NodeNode
datawire.io
NodeNode
Node
38
What will be the sequence of failures in the
event of a large increase in traffic?
* Example sequence: First the database maxes out, then RAM,
then CPU, then file descriptors, then ELBs, then NICs
Awareness of the likely failure sequence will
help you be aware of your headroom and help
build a plan for capacity growth
Knowing your Chokepoint Sequence
NodeNode
NodeCassandra Cassandra Cassandra
NodeHAProxy HAProxy
NodeNode
datawire.io
NodeNode
Node
39
What will be the sequence of failures in the
event of a large increase in traffic?
* Example sequence: First the database maxes out, then RAM,
then CPU, then file descriptors, then ELBs, then NICs
Awareness of the likely failure sequence will
help you be aware of your headroom and help
build a plan for capacity growth
Knowing your Chokepoint Sequence
NodeNode
NodeCassandra Cassandra Cassandra
NodeHAProxy HAProxy
NodeNode NodeNode NodeNode
datawire.io
NodeNode
Node
40
What will be the sequence of failures in the
event of a large increase in traffic?
* Example sequence: First the database maxes out, then RAM,
then CPU, then file descriptors, then ELBs, then NICs
Awareness of the likely failure sequence will
help you be aware of your headroom and help
build a plan for capacity growth
Knowing your Chokepoint Sequence
NodeNode
NodeCassandra Cassandra Cassandra
NodeHAProxy HAProxy
NodeNode NodeNode NodeNode
datawire.io 41
10. How will dependency failures be handled?
Architecture
datawire.io 42
datawire.io 43
Microservice architectures are a highly distributed system
by their nature
That means failures will occur, and on a frequent basis
Dependency Failures
datawire.io 44
Upstream and Downstream Dependencies
Downstream Microservices
Upstream Microservices
Request
Response
Request
Response
datawire.io 45
Any microservice calling another must handle downstream failure, with:
* Timeouts
* Circuit breakers to prevent cascading failure
* Backpressure
* Default response values
* Caching prior responses
* Retries
* Fallback to alternative endpoints
Don’t assume that downstream failures manifest as dead endpoints
* Services get sick more often than they die!
Downstream Dependency Failure
datawire.io 46
Understand what it means for the rest of the system when (not if) your
service fails
A non-critical service (e.g. a logging service invoked asynchronously over
UDP) can fail without causing upstream disruption, at the expense of log
data loss
A critical synchronous service (e.g. a credit card payment service invoked
over RPC) will require careful use by upstream components if transactions
fail mid-stream
Failing to Serve Upstream Dependencies
datawire.io 47
Demo:
Resilient services with
Datawire Connect
datawire.io
It’s free and OSS!
https://github.com/datawire/datawire-connect
We work in a public Slack channel - feel free to join to ask questions about microservices in
general, or about our tech (link on the GitHub page)
Watch the talks from our recent Microservices Practitioner Summit (speakers from
Facebook, Netflix, Uber, Google, Yelp, New Relic…) on microservices.com
And like every other organization in here, we’re hiring!
48
Trying Datawire Connect
datawire.io 49
Thank you!
Any questions?
@brikelly
bkelly@datawire.io

Mais conteúdo relacionado

Mais procurados

ONDaSCA: On-demand Network Data Set Creation Application for Intrusion Detect...
ONDaSCA: On-demand Network Data Set Creation Application for Intrusion Detect...ONDaSCA: On-demand Network Data Set Creation Application for Intrusion Detect...
ONDaSCA: On-demand Network Data Set Creation Application for Intrusion Detect...
IJCSIS Research Publications
 

Mais procurados (20)

IRJET- Proficient Public Substantiation of Data Veracity for Cloud Storage th...
IRJET- Proficient Public Substantiation of Data Veracity for Cloud Storage th...IRJET- Proficient Public Substantiation of Data Veracity for Cloud Storage th...
IRJET- Proficient Public Substantiation of Data Veracity for Cloud Storage th...
 
Cloud Security, Standards and Applications
Cloud Security, Standards and ApplicationsCloud Security, Standards and Applications
Cloud Security, Standards and Applications
 
DDoS Defenses | DDoS Protection and Mitigation | MazeBolt
DDoS Defenses | DDoS Protection and Mitigation | MazeBoltDDoS Defenses | DDoS Protection and Mitigation | MazeBolt
DDoS Defenses | DDoS Protection and Mitigation | MazeBolt
 
Security Risk Assessment for Quality Web Design
Security Risk Assessment for Quality Web DesignSecurity Risk Assessment for Quality Web Design
Security Risk Assessment for Quality Web Design
 
Network security monitoring elastic webinar - 16 june 2021
Network security monitoring   elastic webinar - 16 june 2021Network security monitoring   elastic webinar - 16 june 2021
Network security monitoring elastic webinar - 16 june 2021
 
Cybersecurity breakfast tour 2013 (1)
Cybersecurity breakfast tour 2013 (1)Cybersecurity breakfast tour 2013 (1)
Cybersecurity breakfast tour 2013 (1)
 
A Novel Method of Directly Auditing Integrity On Encrypted Data
A Novel Method of Directly Auditing Integrity On Encrypted DataA Novel Method of Directly Auditing Integrity On Encrypted Data
A Novel Method of Directly Auditing Integrity On Encrypted Data
 
F5 Networks: The Right Way to Protect Against DDoS Attacks (Business White Pa...
F5 Networks: The Right Way to Protect Against DDoS Attacks (Business White Pa...F5 Networks: The Right Way to Protect Against DDoS Attacks (Business White Pa...
F5 Networks: The Right Way to Protect Against DDoS Attacks (Business White Pa...
 
Preparing for the Imminent Terabit DDoS Attack
Preparing for the Imminent Terabit DDoS AttackPreparing for the Imminent Terabit DDoS Attack
Preparing for the Imminent Terabit DDoS Attack
 
F5 networks the_expectation_of_ssl_everywhere
F5 networks the_expectation_of_ssl_everywhereF5 networks the_expectation_of_ssl_everywhere
F5 networks the_expectation_of_ssl_everywhere
 
Securing your Windows Network with the Microsoft Security Baselines
Securing your Windows Network with the Microsoft Security BaselinesSecuring your Windows Network with the Microsoft Security Baselines
Securing your Windows Network with the Microsoft Security Baselines
 
Debakshi_Chakraborty _CV
Debakshi_Chakraborty _CVDebakshi_Chakraborty _CV
Debakshi_Chakraborty _CV
 
Scaling Mobile Network Security for LTE: A Multi-Layer Approach
Scaling Mobile Network Security for LTE: A Multi-Layer ApproachScaling Mobile Network Security for LTE: A Multi-Layer Approach
Scaling Mobile Network Security for LTE: A Multi-Layer Approach
 
DDoS Mitigation Training | DDoS Mitigation Guide | Learn DDoS Mitigation Conc...
DDoS Mitigation Training | DDoS Mitigation Guide | Learn DDoS Mitigation Conc...DDoS Mitigation Training | DDoS Mitigation Guide | Learn DDoS Mitigation Conc...
DDoS Mitigation Training | DDoS Mitigation Guide | Learn DDoS Mitigation Conc...
 
DDoS Mitigation Guide |DDoS Protection Cyber Security | MazeBolt
DDoS Mitigation Guide |DDoS Protection Cyber Security | MazeBoltDDoS Mitigation Guide |DDoS Protection Cyber Security | MazeBolt
DDoS Mitigation Guide |DDoS Protection Cyber Security | MazeBolt
 
VMworld 2013: Introducing NSX Service Composer: The New Consumption Model for...
VMworld 2013: Introducing NSX Service Composer: The New Consumption Model for...VMworld 2013: Introducing NSX Service Composer: The New Consumption Model for...
VMworld 2013: Introducing NSX Service Composer: The New Consumption Model for...
 
En35793797
En35793797En35793797
En35793797
 
ONDaSCA: On-demand Network Data Set Creation Application for Intrusion Detect...
ONDaSCA: On-demand Network Data Set Creation Application for Intrusion Detect...ONDaSCA: On-demand Network Data Set Creation Application for Intrusion Detect...
ONDaSCA: On-demand Network Data Set Creation Application for Intrusion Detect...
 
Sba web sec_dg
Sba web sec_dgSba web sec_dg
Sba web sec_dg
 
Internet Security in corporate environment
 Internet Security in corporate environment Internet Security in corporate environment
Internet Security in corporate environment
 

Semelhante a 2016 - 10 questions you should answer before building a new microservice

Lessons from Large-Scale Cloud Software at Databricks
Lessons from Large-Scale Cloud Software at DatabricksLessons from Large-Scale Cloud Software at Databricks
Lessons from Large-Scale Cloud Software at Databricks
Matei Zaharia
 
Brighttalk understanding the promise of sde - final
Brighttalk   understanding the promise of sde - finalBrighttalk   understanding the promise of sde - final
Brighttalk understanding the promise of sde - final
Andrew White
 
Sukumar Nayak-Agile-DevOps-Cloud Management
Sukumar Nayak-Agile-DevOps-Cloud ManagementSukumar Nayak-Agile-DevOps-Cloud Management
Sukumar Nayak-Agile-DevOps-Cloud Management
Sukumar Nayak
 

Semelhante a 2016 - 10 questions you should answer before building a new microservice (20)

Don't Fumble the Data! Integrate Database Automation into your DevOps Toolchain
Don't Fumble the Data! Integrate Database Automation into your DevOps ToolchainDon't Fumble the Data! Integrate Database Automation into your DevOps Toolchain
Don't Fumble the Data! Integrate Database Automation into your DevOps Toolchain
 
Mris network architecture proposal r1
Mris network architecture proposal r1Mris network architecture proposal r1
Mris network architecture proposal r1
 
Cytoscape CI Chapter 2
Cytoscape CI Chapter 2Cytoscape CI Chapter 2
Cytoscape CI Chapter 2
 
www.ijerd.com
www.ijerd.comwww.ijerd.com
www.ijerd.com
 
From Duke of DevOps to Queen of Chaos - Api days 2018
From Duke of DevOps to Queen of Chaos - Api days 2018From Duke of DevOps to Queen of Chaos - Api days 2018
From Duke of DevOps to Queen of Chaos - Api days 2018
 
Lessons from Large-Scale Cloud Software at Databricks
Lessons from Large-Scale Cloud Software at DatabricksLessons from Large-Scale Cloud Software at Databricks
Lessons from Large-Scale Cloud Software at Databricks
 
Scaling Databricks to Run Data and ML Workloads on Millions of VMs
Scaling Databricks to Run Data and ML Workloads on Millions of VMsScaling Databricks to Run Data and ML Workloads on Millions of VMs
Scaling Databricks to Run Data and ML Workloads on Millions of VMs
 
How to get along with HATEOAS without letting the bad guys steal your lunch?
How to get along with HATEOAS without letting the bad guys steal your lunch?How to get along with HATEOAS without letting the bad guys steal your lunch?
How to get along with HATEOAS without letting the bad guys steal your lunch?
 
Evolution from EDA to Data Mesh: Data in Motion
Evolution from EDA to Data Mesh: Data in MotionEvolution from EDA to Data Mesh: Data in Motion
Evolution from EDA to Data Mesh: Data in Motion
 
Brighttalk understanding the promise of sde - final
Brighttalk   understanding the promise of sde - finalBrighttalk   understanding the promise of sde - final
Brighttalk understanding the promise of sde - final
 
How to Bring Shadow IT to the Light
How to Bring Shadow IT to the LightHow to Bring Shadow IT to the Light
How to Bring Shadow IT to the Light
 
From Monoliths to Microservices at Realestate.com.au
From Monoliths to Microservices at Realestate.com.auFrom Monoliths to Microservices at Realestate.com.au
From Monoliths to Microservices at Realestate.com.au
 
How to add security in dataops and devops
How to add security in dataops and devopsHow to add security in dataops and devops
How to add security in dataops and devops
 
Microservices Architecture - Cloud Native Apps
Microservices Architecture - Cloud Native AppsMicroservices Architecture - Cloud Native Apps
Microservices Architecture - Cloud Native Apps
 
AWS Partner: Grindr: Aggregate, Analyze, and Act on 900M Daily API Calls
AWS Partner: Grindr: Aggregate, Analyze, and Act on 900M Daily API CallsAWS Partner: Grindr: Aggregate, Analyze, and Act on 900M Daily API Calls
AWS Partner: Grindr: Aggregate, Analyze, and Act on 900M Daily API Calls
 
Technology insights: Decision Science Platform
Technology insights: Decision Science PlatformTechnology insights: Decision Science Platform
Technology insights: Decision Science Platform
 
Sukumar Nayak-Agile-DevOps-Cloud Management
Sukumar Nayak-Agile-DevOps-Cloud ManagementSukumar Nayak-Agile-DevOps-Cloud Management
Sukumar Nayak-Agile-DevOps-Cloud Management
 
Apache Kafka® and the Data Mesh
Apache Kafka® and the Data MeshApache Kafka® and the Data Mesh
Apache Kafka® and the Data Mesh
 
Are you ready for the next attack? Reviewing the SP Security Checklist
Are you ready for the next attack? Reviewing the SP Security ChecklistAre you ready for the next attack? Reviewing the SP Security Checklist
Are you ready for the next attack? Reviewing the SP Security Checklist
 
Are you ready for the next attack? reviewing the sp security checklist (apnic...
Are you ready for the next attack? reviewing the sp security checklist (apnic...Are you ready for the next attack? reviewing the sp security checklist (apnic...
Are you ready for the next attack? reviewing the sp security checklist (apnic...
 

Mais de devopsdaysaustin

Mais de devopsdaysaustin (20)

2016 - Open Mic - IGNITE - Open Infrastructure = ANY Infrastructure
2016 - Open Mic - IGNITE - Open Infrastructure = ANY Infrastructure2016 - Open Mic - IGNITE - Open Infrastructure = ANY Infrastructure
2016 - Open Mic - IGNITE - Open Infrastructure = ANY Infrastructure
 
2016 - Open Mic - IGNITE - The Power of #DadOps for women in tech
2016 - Open Mic - IGNITE - The Power of #DadOps for women in tech2016 - Open Mic - IGNITE - The Power of #DadOps for women in tech
2016 - Open Mic - IGNITE - The Power of #DadOps for women in tech
 
2016 - Open Mic - IGNITE - This is a Tire Fire
2016 - Open Mic - IGNITE - This is a Tire Fire2016 - Open Mic - IGNITE - This is a Tire Fire
2016 - Open Mic - IGNITE - This is a Tire Fire
 
2016 - IGNITE - An ElasticSearch Cluster Named George Armstrong Custer
2016 - IGNITE - An ElasticSearch Cluster Named George Armstrong Custer2016 - IGNITE - An ElasticSearch Cluster Named George Armstrong Custer
2016 - IGNITE - An ElasticSearch Cluster Named George Armstrong Custer
 
2016 - IGNITE - Terraform to go from Zero to Prod in less than 1 month and TH...
2016 - IGNITE - Terraform to go from Zero to Prod in less than 1 month and TH...2016 - IGNITE - Terraform to go from Zero to Prod in less than 1 month and TH...
2016 - IGNITE - Terraform to go from Zero to Prod in less than 1 month and TH...
 
2016 - IGNITE - No Assholes
2016 - IGNITE - No Assholes2016 - IGNITE - No Assholes
2016 - IGNITE - No Assholes
 
2016 - IGNITE - Real Heroes Draw Pictures
2016 - IGNITE - Real Heroes Draw Pictures2016 - IGNITE - Real Heroes Draw Pictures
2016 - IGNITE - Real Heroes Draw Pictures
 
2016 - IGNITE - Blameless System Design
2016 - IGNITE - Blameless System Design2016 - IGNITE - Blameless System Design
2016 - IGNITE - Blameless System Design
 
2016 - IGNITE - The Cynefin Model for Operational Transformation
2016 - IGNITE - The Cynefin Model for Operational Transformation2016 - IGNITE - The Cynefin Model for Operational Transformation
2016 - IGNITE - The Cynefin Model for Operational Transformation
 
2016 - IGNITE - DevOps or NoOps
2016 - IGNITE - DevOps or NoOps2016 - IGNITE - DevOps or NoOps
2016 - IGNITE - DevOps or NoOps
 
2016 - Orchestrating multi-container apps: How I came to love the pod
2016 - Orchestrating multi-container apps: How I came to love the pod2016 - Orchestrating multi-container apps: How I came to love the pod
2016 - Orchestrating multi-container apps: How I came to love the pod
 
2016 - Fail Proof Ways to Run Beautiful Tests Regardless Of Browser Choice
2016 - Fail Proof Ways to Run Beautiful Tests Regardless Of Browser Choice2016 - Fail Proof Ways to Run Beautiful Tests Regardless Of Browser Choice
2016 - Fail Proof Ways to Run Beautiful Tests Regardless Of Browser Choice
 
2016 - You Don't Belong Here: Dealing with Impostor Syndrome
2016 - You Don't Belong Here: Dealing with Impostor Syndrome2016 - You Don't Belong Here: Dealing with Impostor Syndrome
2016 - You Don't Belong Here: Dealing with Impostor Syndrome
 
2016 - Compliance as Code - InSpec
2016 - Compliance as Code - InSpec2016 - Compliance as Code - InSpec
2016 - Compliance as Code - InSpec
 
2016 - Serverless Microservices on AWS with API Gateway and Lambda
2016 - Serverless Microservices on AWS with API Gateway and Lambda2016 - Serverless Microservices on AWS with API Gateway and Lambda
2016 - Serverless Microservices on AWS with API Gateway and Lambda
 
2016 - Safely Removing the Last Roadblock to Continuous Delivery
2016 - Safely Removing the Last Roadblock to Continuous Delivery2016 - Safely Removing the Last Roadblock to Continuous Delivery
2016 - Safely Removing the Last Roadblock to Continuous Delivery
 
2016 - Easing Your Way Into Docker: Lessons From a Journey to Production
2016 - Easing Your Way Into Docker: Lessons From a Journey to Production2016 - Easing Your Way Into Docker: Lessons From a Journey to Production
2016 - Easing Your Way Into Docker: Lessons From a Journey to Production
 
2016 - IGNITE - Rugged Enterprise DevSecNetQAGovOps
2016 - IGNITE - Rugged Enterprise DevSecNetQAGovOps2016 - IGNITE - Rugged Enterprise DevSecNetQAGovOps
2016 - IGNITE - Rugged Enterprise DevSecNetQAGovOps
 
2016 - IGNITE - How Do I Even Swarm
2016 - IGNITE - How Do I Even Swarm2016 - IGNITE - How Do I Even Swarm
2016 - IGNITE - How Do I Even Swarm
 
2016 - IGNITE - ChatOps for Developers and Everyone Else, Too
2016 - IGNITE - ChatOps for Developers and Everyone Else, Too2016 - IGNITE - ChatOps for Developers and Everyone Else, Too
2016 - IGNITE - ChatOps for Developers and Everyone Else, Too
 

Último

%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs 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
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
%+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
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
chiefasafspells
 

Último (20)

%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
 
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
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
 
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?
 
WSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security Program
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
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...
 
%+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...
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
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
 
%+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...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
 
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
 
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...
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
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
 

2016 - 10 questions you should answer before building a new microservice

  • 1. Creating a Microservice? Answer These 10 Questions First. Brian Kelly, VP Engineering, Datawire DevOpsDays Austin, May 2nd 2016 @brikelly bkelly@datawire.io
  • 2. datawire.io Hi! Me * Working in distributed systems most of my career * Built a number of middleware and messaging products * Strangled a SaaS monolith with microservices Datawire * Based in Boston and San Francisco * We provide technology for companies adopting microservices * We’ve spent a lot of time with the master microservices practitioners from high-growth technology companies
  • 3. datawire.io Microservices increase development velocity DevOps increases release velocity For organizations scaling rapidly, doing one without the other is…“suboptimal” Microservices and DevOps: A Perfect Match
  • 4. datawire.io 4 A microservice is deliberately simple on the inside It’s what’s outside that’s hard
  • 5. datawire.io 5 “There are only two hard problems in distributed systems: 1. Exactly-once delivery 2. Guaranteed order of messages 1. Exactly-once delivery” @mathiasverraes
  • 6. datawire.io Force awareness in your teams of latent concerns * For example, potential future issues with scalability and reliability It’s OK to not have sophisticated answers for each question * But asking them is important! Why Ask These 10 Questions?
  • 8. datawire.io 8 Organization 1. Have you invested enough in developer infrastructure?
  • 9. datawire.io 9 Developer Infrastructure Teams The dev infrastructure team focuses on developer education, core infrastructure, and driving standards through a great DX.
  • 10. datawire.io 10 Investing in the core infrastructure necessary for independent iteration is key Continuous delivery workflow Loosely coupled services Application resilience
  • 11. datawire.io 11 2. How will your new service be deployed and upgraded? Organization
  • 12. datawire.io Bake Docker Packer Deploy AWS Cloud Foundry Docker GCP Kubernetes Mesos Microso! Azure Build Circle CI Go.cd JFrog Jenkins Travis Define DatawireQuark Finagle/Thri! HTTP/JSON gRPC/Protobuf Monitor AppDynamics DataDog InfluxData Nagios New Relic SignalFX Sysdig Wavefront Zipkin Connect Datawire Connect Homegrown Hystrix / RIbbon SmartStack DevOps Development Build andpackagethecode/ contractintoasource artifact GitHub / Source JAR, Gem, npm AMI, Container, VM Microservice Define thecontract(API,data format,protocol) thebusinesslogic Code Connect themicroservicetoother microservices Monitor thehealthofthedeployed microservice Deploy theartifacttorunonthe appropriatecompute resources theapplication& dependenciesintodeploy- ableartifact Bake Automated DevOps workflow: Spinnaker 12 Our Model
  • 13. datawire.io 13 Continuous delivery workflow 1. Workflow needs to be defined but does not need to be fully automated. Increase automation as the number of microservices grows. 2. Need to have service running in production in order to fully test. Quickly move from commit to customer
  • 14. datawire.io 14 Each upgrade is an opportunity to break the contract between your new service and any other dependent services Plenty of techniques exist for mitigating the chance of failure: * Well-specified structural and behavioral service contracts * Dark launching for examining the effect of prod traffic without risk * Response diff’ing for ensuring contract compliance * Canary testing for progressive rollout * Blue/Green deployment for fast rollback Upgrading your Service
  • 15. datawire.io 15 3. How will it be monitored and measured? Organization
  • 16. datawire.io 16 Ways of monitoring your service’s health: OK: * Health check from monitor to service (GET /health from an ELB) Better: * “Call Home” health check from service to monitor (APM approach) Best: * The client’s experience calling real APIs on the service Monitoring and Measuring your Service
  • 17. datawire.io 17 Which service is introducing the maximum latency into a request? Which service is the root cause of a cascade failure? Monitor the traffic, not just the services Diagnosis
  • 18. datawire.io 18 4. How will it be tested? Development
  • 19. datawire.io 19 Unit testing a single service is the easy part What’s harder: testing the entire system How will a developer verify that their changes to a single microservice will not break other parts of the system? Staging environments bring a little comfort, but add significant cost, complexity, and distractions Testing
  • 20. datawire.io 20 Test before launch Mock services Sophisticated deployment workflows Automated regression tests Test after launch Dark launch Canary testing Blue / green deployment Microservice Testing Is Required on Both Sides of Deployment Reduce probability of failure Reduce impact of failure
  • 21. datawire.io 21 5. How will it be secured? Development
  • 22. datawire.io 22 Most likely type of attack vectors: * Exploitation of OWASP Top 10 vulnerabilities in your web application * Internal staff with existing access * Social engineering Less likely type of attack vector: * Attacker gains access behind your perimeter, logs on to your containers, reverse-engineers your internal service APIs, sends fake requests to and from each microservice Prioritize Potential Attack Vectors
  • 23. datawire.io 23 6. How will it be configured? Development
  • 24. datawire.io 24 “Configuration” can be categorized: • Static configuration (log file locations, ports to listen on, …) • Runtime configuration (thread pool sizes, JVM heap size, …) • Behavioral configuration (feature flags, request routing rules, …) Configuration
  • 25. datawire.io 25 Prevent arbitrary static configuration changes to production systems * Instead, deploy those changes into new immutable, copy-on-write containers Strive for adaptive, elastic services that require zero dynamic configuration changes at runtime to stay healthy Reserve behavioral configuration for progressive rollouts, dark launching, routing Configuration
  • 26. datawire.io 26 7. How will it be consumed by the rest of the system? Architecture
  • 27. datawire.io 27 Your new microservice will provide new value to the rest of the system But will it offer an SLA for its latency, uptime, and reliability? Those who consume it will appreciate it: • They can specify timeouts and trip circuit breakers when response latency is high • They will know which operations are idempotent • They could cache some responses for large queries • They can spot uptime SLA discrepancies Datawire’s Quark is an IDL that captures both structure and behavior Your microservice needs a contract
  • 28. datawire.io 28 Structural vs. Behavioral Contracts Structural: Intended for Tools
  • 29. datawire.io 29 Structural vs. Behavioral Contracts Behavioral: Intended for Humans Structural: Intended for Tools
  • 30. datawire.io 30 8. How will it be discovered? Architecture
  • 31. datawire.io 31 The simpler your discovery system, the less flexibility it offers. DNS schemes: very simple, but don’t take into account availability, also makes the developer experience difficult Strongly consistent datastores (e.g. Zookeeper): more flexible, but don’t handle network partitions at all Eventually consistent datastores with pub/sub (e.g. Datawire Connect): very flexible, handles partitions well, clients and services unaffected even when they can’t reach the discovery system Service Discovery
  • 32. datawire.io 32 9. How will it scale? Architecture
  • 33. datawire.io 33 9. How will it scale? Architecture
  • 34. datawire.io 34 9. How will it fail to scale? Architecture
  • 35. datawire.io Node NodeNode 35 What will be the sequence of failures in the event of a large increase in traffic? * Example sequence: First the database maxes out, then RAM, then CPU, then file descriptors, then ELBs, then NICs Awareness of the likely failure sequence will help you be aware of your headroom and help build a plan for capacity growth Knowing your Chokepoint Sequence NodeNode NodeCassandra Cassandra Cassandra NodeHAProxy HAProxy NodeNode
  • 36. datawire.io Node NodeNode 36 What will be the sequence of failures in the event of a large increase in traffic? * Example sequence: First the database maxes out, then RAM, then CPU, then file descriptors, then ELBs, then NICs Awareness of the likely failure sequence will help you be aware of your headroom and help build a plan for capacity growth Knowing your Chokepoint Sequence NodeNode NodeCassandra Cassandra Cassandra NodeHAProxy HAProxy NodeNode
  • 37. datawire.io NodeNode Node 37 What will be the sequence of failures in the event of a large increase in traffic? * Example sequence: First the database maxes out, then RAM, then CPU, then file descriptors, then ELBs, then NICs Awareness of the likely failure sequence will help you be aware of your headroom and help build a plan for capacity growth Knowing your Chokepoint Sequence NodeNode NodeCassandra Cassandra Cassandra NodeHAProxy HAProxy NodeNode
  • 38. datawire.io NodeNode Node 38 What will be the sequence of failures in the event of a large increase in traffic? * Example sequence: First the database maxes out, then RAM, then CPU, then file descriptors, then ELBs, then NICs Awareness of the likely failure sequence will help you be aware of your headroom and help build a plan for capacity growth Knowing your Chokepoint Sequence NodeNode NodeCassandra Cassandra Cassandra NodeHAProxy HAProxy NodeNode
  • 39. datawire.io NodeNode Node 39 What will be the sequence of failures in the event of a large increase in traffic? * Example sequence: First the database maxes out, then RAM, then CPU, then file descriptors, then ELBs, then NICs Awareness of the likely failure sequence will help you be aware of your headroom and help build a plan for capacity growth Knowing your Chokepoint Sequence NodeNode NodeCassandra Cassandra Cassandra NodeHAProxy HAProxy NodeNode NodeNode NodeNode
  • 40. datawire.io NodeNode Node 40 What will be the sequence of failures in the event of a large increase in traffic? * Example sequence: First the database maxes out, then RAM, then CPU, then file descriptors, then ELBs, then NICs Awareness of the likely failure sequence will help you be aware of your headroom and help build a plan for capacity growth Knowing your Chokepoint Sequence NodeNode NodeCassandra Cassandra Cassandra NodeHAProxy HAProxy NodeNode NodeNode NodeNode
  • 41. datawire.io 41 10. How will dependency failures be handled? Architecture
  • 43. datawire.io 43 Microservice architectures are a highly distributed system by their nature That means failures will occur, and on a frequent basis Dependency Failures
  • 44. datawire.io 44 Upstream and Downstream Dependencies Downstream Microservices Upstream Microservices Request Response Request Response
  • 45. datawire.io 45 Any microservice calling another must handle downstream failure, with: * Timeouts * Circuit breakers to prevent cascading failure * Backpressure * Default response values * Caching prior responses * Retries * Fallback to alternative endpoints Don’t assume that downstream failures manifest as dead endpoints * Services get sick more often than they die! Downstream Dependency Failure
  • 46. datawire.io 46 Understand what it means for the rest of the system when (not if) your service fails A non-critical service (e.g. a logging service invoked asynchronously over UDP) can fail without causing upstream disruption, at the expense of log data loss A critical synchronous service (e.g. a credit card payment service invoked over RPC) will require careful use by upstream components if transactions fail mid-stream Failing to Serve Upstream Dependencies
  • 48. datawire.io It’s free and OSS! https://github.com/datawire/datawire-connect We work in a public Slack channel - feel free to join to ask questions about microservices in general, or about our tech (link on the GitHub page) Watch the talks from our recent Microservices Practitioner Summit (speakers from Facebook, Netflix, Uber, Google, Yelp, New Relic…) on microservices.com And like every other organization in here, we’re hiring! 48 Trying Datawire Connect
  • 49. datawire.io 49 Thank you! Any questions? @brikelly bkelly@datawire.io