Variations
In this lesson, we'll look at some variations in the approach we've discussed so far.
We'll cover the following
Consul is very flexible and can be used in many different ways.
Combination with frontend integration #
Like other approaches Consul can be combined with frontend integration (see chapter 3).
SSI (Server-side Includes) with Apache httpd is simple to combine since an Apache httpd is already present in the system.
Combination with asynchronous communication #
Synchronous communication can be combined with asynchronous communication (see chapter 6). However, one type of communication should suffice normally.
Atom or other asynchronous approaches via HTTP (see chapter 8) are easy to integrate into an HTTP-based system like Consul.
Other load balancers #
Instead of Apache httpd, a server like nginx or a load balancer like HAProxy can also be used for routing of requests from the outside.
Ribbon can be replaced by such a load balancer so that the internal load balancing is then configured with Consul Template.
In this case, only one type of load balancer is used for load balancing and routing. Unlike the Java library Ribbon, Apache httpd or nginx can be used with any programming language.
Each microservice then has its own httpd or nginx instance so that no bottleneck or single point of failure is created.
Service meshes #
Service meshes provide a lot of useful features for resilience, monitoring, tracing, and logging. Istio is an example of a service mesh.
A service mesh injects proxies into the communication between the microservices. Istio supports Consul to achieve that.
With Istio, Consul can be extended to become a complete platform for the operation of microservices.
Get hands-on with 1400+ tech skills courses.