Summary

In this chapter, we had the opportunity to develop applications using Spring Cloud for the first time in this book. In my opinion, the best way to start an adventure with a framework for microservices is with trying to figure out how to implement service discovery properly. Starting with the simplest use cases and examples, we have been going through advanced and production-ready features provided by the Netflix OSS Eureka project. I have shown you how to create and run a basic client and a standalone discovery server in five minutes. Based on that implementation, I have introduced how to customize the Eureka client and server to meet our specific needs, placing the emphasis on negative scenarios such as network or application failure. Such features as the REST API or UI dashboard have been discussed in detail. Finally, I have shown you how to create a production-ready environment using Eureka's mechanisms such as replication, zones, and high availability. With that knowledge, you should be able to choose those features of Eureka through which you build a service discovery adapted to the specifics of your microservice-based architecture. 

Once we have discussed service discovery, we may proceed to the next essential element in microservice-based architecture, a configuration server. Both discovery and configuration services are usually based on key/value stores, so they may be provided with the same products. However, since Eureka is dedicated only to discovery, Spring Cloud introduces their own framework for managing distributed configurations, Spring Cloud Config.