Chapter Conclusion

In this lesson, we'll look at a quick conclusion to the chapter.

Setting up a microservices system with Consul is another option for a synchronous system.

Summary #

This infrastructure meets the typical challenges of synchronous microservices as follows.

Service discovery #

Service discovery is covered by Consul. Consul is very flexible; due to the DNS interface and Consul Template it can be used with many technologies. This is particularly important in the context of microservices. While a system might not need to use a variety of technologies from the start, in the long term it is advantageous to be able to integrate new technologies.

Increased transparency #

Consul is more transparent to use than Eureka. The Spring Cloud applications still need special Consul configurations, but Consul offers a configuration in Apache format for Apache httpd so at least in this case Consul is transparent.

If Registrator is used to register the microservices, and Consul is used as a DNS server, Consul is fully transparent and can be used without any code dependencies. With Envconsul, Consul can even configure the microservices without code dependencies.

Configuration #

Consul can be used to configure the microservices. In this way, with only one technological approach, both service discovery and configuration can be implemented.

Resilience #

Resilience is not implemented in this example.

Routing #

Routing with Apache httpd is a relatively common approach. This reduces the technological complexity, which is quite high in a microservices system anyway. With the large number of new technologies and a new architectural approach, it is helpful to cover some areas with established approaches.

Load balancing #

Load balancing is implemented with Ribbon, like in the Netflix example (see Load Balancing: Ribbon). However, it is not a problem to provide each microservice instance with an Apache httpd which is configured by Consul Template in such a manner that it provides load balancing for outbound calls. For Consul DNS, Consul even implements load balancing transparently with the DNS server. In that case, no additional technology for load balancing is needed.

Get hands-on with 1200+ tech skills courses.