Spring Cloud at Netflix Notes
These are notes I'm leaving for myself after making my way through a demo project provided by Netflix at SpringOne2GX. At the time of this writing the project is about a year old, but covers the groundwork for a reliable distrbuted MicroService application architecture.
The presentation by Jon Schneider and Taylor Wicksell of Netflix is available to watch here.
Here's some links to the project files I've forked and fixed.
- https://github.com/LargePixels/sample-membership
- https://github.com/LargePixels/sample-eureka
- https://github.com/LargePixels/sample-recommendations
- https://github.com/LargePixels/sample-hystrix-dash
The Gist
You need to clone and build a few projects to get going. The membership app which is a standalone service that sends information about users, the recommendations app which calls the membership app returns movie recommendations based on age.
Clone and eureka project and start the eureka server. This will use Spring Boot to launch a Eureka server which membership and recommendations register with. Now recommendation can send messages to the membership service without going through DNS. This is useful because in a production env, you might have 100 - 1000s of membership services up, configuring DNS for all these would be a pain. This is different from a load balancer because of the logic Eureka can implement if something goes wrong.
After this we get to see how to incorporate metrics logging with Hystrix, and making service calls with the Feign client. Side note, I can't get the RestTemplate way of communicating working, something must have changed in the packaging since this video.