adventures in a microservice world at rea group
DESCRIPTION
Presented by Andy Trigg (REA) and Evan Bottcher (ThoughtWorks) at Yow! West conference May 2014.TRANSCRIPT
Adventures in a micro-services world
May 2014
Evan Bottcher @evanbottcher
Andy Trigg @gigantiqandy
Microservices?
TriassicPeriod
JurassicPeriod
CretaceousPeriod
Mesozoic Era
(source: wikimedia)
CRMERP
(source: wikipedia.org) (2)
http://
http://
http://
http://
Stable Interfaces
http://
http://
Stable Interfaces
http://
http://
Stable Interfaces
(source: wikimedia)
Micro-services
2 services deployed. (3 months+)
#noops
(source: wikimedia)
Create a safe environment(as simple and as hard as that)
Netscaler configs. Firewall rules. Name all the things consistently.
Configured package repository. Cron jobs. Service healthcheck
Run the specs. Run code hygiene. Keep all the gems up to date.
Configure monitoring. Enable NRPE. Configure apache.
Build an RPM. Configure dependencies. Ruby version. Configure
Passenger configs. Logrotate. Splunk forwarder. Logger
Create users. Configure NewRelic. Load rake tasks. Load
Connect to a database. Make connection pooling work.
Externalise configuration. Run database migrations. Chkconfigs.
If you build it, you support it
‘Jurassic Period’
(source: wikipedia.org)
5-10 services. (2 weeks each)
(source: flickr.om)
‘Stencil’ (Service Template)
Stencil
Stencil ServiceClone
Stencil Service
Service
Service
Service
Service
Service
Stencil Service
Service
Service
Service
Service
Service
Stencil Service
Service
Service
Service
Service
Service
Patch
Stencil Service
Service
Service
Service
Service
Service
Stencil Service
Service
Service
Service
Service
Service
Notify
Harvest a service template(but don’t start by writing one)
Sharing things is hard
Service
Service Service
Service Service Service
Service Service Service
Library
Service Service Service
Library
ServiceService
Service Service Service
Library
ServiceService
Service Service Service ServiceService
Service Service Service ServiceService
Service Service Service ServiceService
Service Service Service
Library
ServiceService
Service Service Service ServiceService
Service Service Service ServiceService
Service Service Service ServiceService
Be cautious about shared stuff
(copy/paste may not be wrong)
End to end testing is a scam
Fast feedback in isolation
Fast feedback in isolation+
Early detection
Fast feedback in isolation+
Early detection+
Rapid recovery
Evaluate the cost-benefit of your tests(particularly slow integration tests)
Cretaceous Period (Now)
(source: wikimedia.org)
50+ services. (2 hours each)
Example
Condor
CondorCustomerAcceptance
CondorCustomerAcceptance
AcceptedContracts Adapter
CondorCustomerAcceptance
AcceptedContracts Adapter
Contracts
CondorCustomerAcceptance
AcceptedContracts Adapter
Contracts CDM
CondorCustomerAcceptance
AcceptedContracts Adapter
Contracts CDM
Contract Proposals
Pricing
Account Manager
Assignments Separate codebases Independently deployed
Custodianship
Custodianship
Architectural Direction
Knowledge Transfer
Long Term Asset Health
Support
Establish Service Custodianship*
(*Only do it better!)
Be cautious about shared stuff (take 2)
Delivery Engineering
“We are done when there is a consistent approach that allows users a clear set of options to deploy or change the TMI in a monitored, secure.
We aim to remove hurdles that slow our pace of change and ensure the whole team has the knowledge to responsibly operate the system.!This will take as long as it should.” - Hydra’s Vision
Establish a Delivery Engineering capability
What is still in progress?
(source: wikipedia.org)
What does the future hold?
What have we learnt?
• Create a safe(-ish) isolated environment
• Create a safe(-ish) isolated environment
• If you build it, you support it
• Create a safe(-ish) isolated environment
• If you build it, you support it
• Be cautious about shared stuff
• Create a safe(-ish) isolated environment
• If you build it, you support it
• Be cautious about shared stuff
• Harvest a service template (or multiple)
• Create a safe(-ish) isolated environment
• If you build it, you support it
• Be cautious about shared stuff
• Harvest a service template (or multiple)
• Evaluate the cost-benefit of your automated tests
• Create a safe(-ish) isolated environment
• If you build it, you support it
• Be cautious about shared stuff
• Harvest a service template (or multiple)
• Evaluate the cost-benefit of your automated tests
• Production is the best test environment
• Create a safe(-ish) isolated environment
• If you build it, you support it
• Be cautious about shared stuff
• Harvest a service template (or multiple)
• Evaluate the cost-benefit of your automated tests
• Production is the best test environment
• Establish service custodianship
• Create a safe(-ish) isolated environment
• If you build it, you support it
• Be cautious about shared stuff
• Harvest a service template (or multiple)
• Evaluate the cost-benefit of your automated tests
• Production is the best test environment
• Establish service custodianship
• ‘Delivery Engineering’ is a thing