Adventureswith micro services
-
Upload
thoughtworks -
Category
Technology
-
view
526 -
download
1
Transcript of Adventureswith micro services
Adventures with
micro-ServicesMohit Thatte (@mohitthatte)
Jesal Mistry (@jesalnmistry)
ThoughtWorks Inc.
What?
Why?
How?
When?
Components
Library Service
What are micro services?
small independent composable
services
that do one thing well
Unix philosophyWrite programs that do one thing well.
Write programs that work together.
cat | grep | sed | awk | ...
HTTP is the new pipe!
lots of legacy, no reuse
not flexible, high cost of change
no one knows how it works
concentrated complexity
independent small that do one thingcomposable
90 year old business
“A 100k loc app is just 100 1k loc appswaiting to happen”
- Jeff Bay
Adventure so far
25 VM’s in production
10+ micro-services
one click deployment
60+ VM’s acrossenvironments
µService
DB
µService
DB
µService
DB
µService
DB
Orders PaymentsCustomersLegacy ResultsOrderProcessing
Catalog(Games)
Thumb Rules
1 top level resource (2 at most)
bounded contexts
focus on contracts
avoid coupling
idempotent jobs
extract cross cutting concerns
Orders PaymentsCustomers
Communications
Legacy ResultsOrderProcessing
ScheduledJobs
Errorreporting
Catalog(Games)
Continuous Delivery
Is my code good to go to production?
Can I deploy it in a single click?
“we’re effectively pushing thecomplexity from the application
into the infrastructure...”
- James Lewis
CI + DevOpsenables
single-click deployment
so easy, our product owner does it!
it just works™
3 mins to production (~25 servers)
Puppet Solo
Provisioning begins at home - Vagrant
Puppet goes through CI just like app code
Our ideal : ImmutableServer
Provisioning
Tradeoffs
benefit cost
small units of reuse/maintenance complex infrastructure
grow independently (**polyglot) network overhead
scale independently fragmented data
“easier” to grok “harder” to grok
isolated boundaries coarse-grained API
logging / tracing