Mar 19, 2015 - The Challenges of Microservice Architectures. â Monitoring. â Decomposition. â Distributed Data. â
Deep Dive into Dockerized Microservices
19.3.2015 Tobias Bayer & Hendrik Still
What are Microservices?
$
101 101 010 0
What are Microservices?
$
● ● ●
Split up the application into single services based on business capabilities Communicating with lightweight mechanisms e.g REST over HTTP (SOAP isn’t lightweight!) Each Microservice is running in its own process
What are the Benefits?
● ● ● ● ● ●
Scalability Fault-tolerance Polyglot Development Organisational Alignment Small Code Bases Independent Deployment
The Challenges of Microservice Architectures
● ● ● ● ● ● ● ● ● ● ● ●
Monitoring Decomposition Distributed Data Transactions Distributed State Shared Code Versioning Failure Handling Security Service Discovery Testing ...
Service Discovery
Service Discovery?
$
Service Discovery - Different Views
Infrastructure View
● one central registry ● already available
Application View
● one registry per application ● portable infrastructure ● allows application specific features
Eureka
● Part of Netflix OSS ● Single purpose registry ● REST-interface
● Comes with a Java client ● Very good integration into Spring ● Allows client side load balancing via Ribbon
Eureka Logo: https://github.com/Netflix/eureka/blob/master/images/logo/eureka-logo-2624.png
Demo Time!
Product-Price-Service
$ Product-Service
Product-Details-Service
Consumer-Driven Contracts
Difficulties with Testing Microservices
Commit Stage
Testing
V2
V2
Commit Stage
$ V2
Testing
Production
V2
Production
$
$
V2
V2
Difficulties with Testing Microservices
Commit Stage
Testing
V2
V2
Production
V2
$ V1 Commit Stage
$
Testing
$
V2 V1
$ V2
V1
Production
V2
Solution: Consumer Contracts!
Solution: Consumer-Driven Contract Testing
Pact Demo
Product-Price-Service
$ Product-Service
Product-Details-Service
Thank you for listening!
Contact Tobias Bayer
[email protected] Hendrik Still
[email protected] inovex GmbH Office Karlsruhe Ludwig-Erhard-Allee 6 76131 Karlsruhe