Microservices 
Small independent processes 
architecture
The monolith 
image by Kačka a Ondra (CC BY 2.0) https://www.flickr.com/photos/14548166@N03/
Microservices 
image by _big_mouth_ (CC BY-SA 2.0) https://www.flickr.com/photos/big_mouth/
Warm up 
#!/bin/sh 
cat bla.txt | tr ‘ ‘ ‘n’ | sort | uniq -c | sort -rn
What are microservices? 
#!/bin/sh 
cat bla.txt | tr ‘ ‘ ‘n’ | sort | uniq -c | sort -rn 
● Small 
● Replaceable 
● Independent 
● Own process (for memory 
and cpu profiling) 
● Simple interfaces 
(http+json~rest) 
● Upgrade strategy 
(versioning?) 
● Communication via event 
bus (pub/sub) 
● Service boundaries 
● Single responsibility 
● Testable 
● Fast + easy to startup 
● Fail fast 
● Monitoring 
● Continuous delivery
What are microservices? 
the upsides: 
#!/bin/sh 
cat bla.txt | tr ‘ ‘ ‘n’ | sort | uniq -c | sort -rn 
● No long build cycles 
● Less complexity 
● Not the whole ship is sinking 
● Deployments don’t have to be “all or nothing” 
● Scalable 
● Chunks that are easier to understand also for new team members or 
in legacy code 
● Finding the needle in the now smaller haystack in case of bugginess 
● “multilingual”
What are microservices? 
trade offs: 
#!/bin/sh 
cat bla.txt | tr ‘ ‘ ‘n’ | sort | uniq -c | sort -rn 
● Many processes to manage 
● Operational complexity 
● Moving parts 
● Latency? (Bound to one specific datacenter?) 
● Overall memory consumption 
● Might just be another way of building chaos 
● Monitoring logic (“fucking nightmare”) 
● Managing environments 
not a silver bullet!
Container 
Migration 
User Interface 
Logic 
Data 
Container 
Shopping Cart 
Static Content 
Tracking 
Recommandations 
Core 
Container Container
Construction manual 
Proxy (+Load Balancing) 
= top level resource 
service service service 
service service 
Database 
(may also be distributed) 
Messaging (async)
Hands on example 
live diagramming o/
Questions?
The end 
sources + further reading: 
http://www.slideshare.net/adriancockcroft/goto-berlin 
http://www.infoq.com/news/2014/11/gotober-wunderlist-microservices 
http://www.infoq.com/presentations/migration-cloud-microservices 
http://martinfowler.com/articles/microservices.html 
https://www.youtube.com/watch?v=-5QEnbpFp3Q 
https://www.youtube.com/watch?v=BiFaBEOty8c

Microservices

  • 1.
    Microservices Small independentprocesses architecture
  • 2.
    The monolith imageby Kačka a Ondra (CC BY 2.0) https://www.flickr.com/photos/14548166@N03/
  • 3.
    Microservices image by_big_mouth_ (CC BY-SA 2.0) https://www.flickr.com/photos/big_mouth/
  • 4.
    Warm up #!/bin/sh cat bla.txt | tr ‘ ‘ ‘n’ | sort | uniq -c | sort -rn
  • 5.
    What are microservices? #!/bin/sh cat bla.txt | tr ‘ ‘ ‘n’ | sort | uniq -c | sort -rn ● Small ● Replaceable ● Independent ● Own process (for memory and cpu profiling) ● Simple interfaces (http+json~rest) ● Upgrade strategy (versioning?) ● Communication via event bus (pub/sub) ● Service boundaries ● Single responsibility ● Testable ● Fast + easy to startup ● Fail fast ● Monitoring ● Continuous delivery
  • 6.
    What are microservices? the upsides: #!/bin/sh cat bla.txt | tr ‘ ‘ ‘n’ | sort | uniq -c | sort -rn ● No long build cycles ● Less complexity ● Not the whole ship is sinking ● Deployments don’t have to be “all or nothing” ● Scalable ● Chunks that are easier to understand also for new team members or in legacy code ● Finding the needle in the now smaller haystack in case of bugginess ● “multilingual”
  • 7.
    What are microservices? trade offs: #!/bin/sh cat bla.txt | tr ‘ ‘ ‘n’ | sort | uniq -c | sort -rn ● Many processes to manage ● Operational complexity ● Moving parts ● Latency? (Bound to one specific datacenter?) ● Overall memory consumption ● Might just be another way of building chaos ● Monitoring logic (“fucking nightmare”) ● Managing environments not a silver bullet!
  • 8.
    Container Migration UserInterface Logic Data Container Shopping Cart Static Content Tracking Recommandations Core Container Container
  • 9.
    Construction manual Proxy(+Load Balancing) = top level resource service service service service service Database (may also be distributed) Messaging (async)
  • 10.
    Hands on example live diagramming o/
  • 11.
  • 12.
    The end sources+ further reading: http://www.slideshare.net/adriancockcroft/goto-berlin http://www.infoq.com/news/2014/11/gotober-wunderlist-microservices http://www.infoq.com/presentations/migration-cloud-microservices http://martinfowler.com/articles/microservices.html https://www.youtube.com/watch?v=-5QEnbpFp3Q https://www.youtube.com/watch?v=BiFaBEOty8c