Our DevOps Toolbox: The Consul Interview
Consul is another arrow in our quiver of DevOps tools. Recently, Michael Shklyar, a DevOps Software Engineer from the Exadel Digital Transformation Practice, recently sat down with Alexey Korzhov, a DevOps specialist from one of our client projects, to discuss Consul, it’s advantages, and how it helps him solve issues.
What is Consul?
Consul is a popular “infra tool” that can be used as a distributed key-value storage, as well as a service discovery feature that includes back end storing IPs, ports, health info, and metadata about discovered services. The service discovery feature uses a fully-featured Consul cluster that has both a server side and a client side. The server side can also consist of clusters (data centers) in order to increase a system’s fail-operational capability. This fail-safety cluster can be created for various locations all over the world.
What’s a central feature of Consul?
Consul supports service discovery as a decentralised service. In other words, the cluster has a server and agents, namely nodes (virtual machines, on-premise machines), on which an agent is set up. All services that are installed on the same nodes are registered in Consul with the help of an agent and that gives us decentralisation.
What are some more benefits of using Consul?
One benefit of applying Consul is automatic detection and registration of services. When new services are registered, old services immediately detect these new services. It is also important to detect when services are not available (for example when a service is compulsorily terminated or health checking isn’t operational).
Another benefit of using Consul is that it can substitute other well known monitoring systems, such as Zabbix and Nagios. Consul is quite flexible and the monitoring system has numerous metrics. We can even choose metrics for monitoring containers.
Moreover, Consul provides secure service communication using TLS, which means that the traffic between nodes and agents is encrypted. This Consul solution capability is named Service Mesh. It’s possible to set options for access control lists to allow or reject interaction between applications.
The main benefit of Consul, as opposed to microservices architecture, is that microservices architecture is quite complex. In order to avoid future issues with scaling, we always have to keep in mind the possible effect of integrating new applications. The advantage of Consul is that it allows us to determine all these inputs at the initial stage. We can even detect errors that may arise when implementing new services, or when the architecture is built in the wrong way.
The Big Takeaway
Generally speaking, it takes a long time to build architecture, but Consul allows us to save time and money in both construction and scaling. Microservices and other distributed systems can enable faster and simpler software development, but the trade-off results in greater operational complexity from interservice communication, configuration management, and network segmentation.
Consul is an open source tool that solves these new complexities by providing service discovery, health checks, load balancing, a service graph, mutual TLS identity enforcement, and a configuration key-value store. These features make Consul an ideal control panel for a service mesh solution.
Learn more here about Exadel’s Digital Transformation practice and the challenges it can solve. Ask to speak with our experts to find out even more.