# Consul - much more than a Service Discovery Tool

- Speaker: [Alon Becker](/wiki/speakers/alon-becker.md)
- Event: [Reversim Summit 2015](/wiki/years/2015.md)
- Video: https://www.youtube.com/watch?v=S6QomjOdAC0
- Transcript: [/transcripts/2015/45-S6QomjOdAC0.md](/transcripts/2015/45-S6QomjOdAC0.md)
- Language: Hebrew · Type: talk · Level: intermediate
- Topics: [DevOps](/wiki/topics/devops.md), [Infrastructure](/wiki/topics/infrastructure.md), [Distributed Systems](/wiki/topics/distributed-systems.md), [Microservices](/wiki/topics/microservices.md)

> Written by an LLM from machine transcripts. It can contain errors. Check the transcript before you quote it.

## Summary

The speaker shares insights on how their organization adopted Consul to streamline operations, moving beyond basic service discovery. They explain how they use Consul's key-value store, health checks, and watchers to implement a pull-based deployment pipeline and manage configuration dynamically. The talk highlights practical use cases, architectural patterns, and why Consul was chosen over alternative tools.

## Key points

- [2:37](https://www.youtube.com/watch?v=S6QomjOdAC0&t=157s) The speaker introduces the main operational use cases for Consul, focusing on microservices, dynamic configuration, and deployment pipelines.
- [4:53](https://www.youtube.com/watch?v=S6QomjOdAC0&t=293s) Traditional configuration management tools like Chef are compared and found insufficiently dynamic for real-time application configuration updates.
- [7:01](https://www.youtube.com/watch?v=S6QomjOdAC0&t=421s) The organization's deployment pipeline is detailed, highlighting various testing and staging stages from code compilation to production.
- [14:37](https://www.youtube.com/watch?v=S6QomjOdAC0&t=877s) The underlying architecture of Consul is explained, including the Raft consensus algorithm and the Gossip protocol for cluster communication.
- [18:51](https://www.youtube.com/watch?v=S6QomjOdAC0&t=1131s) The Consul key-value store and health checks are presented as core mechanisms for sharing state and monitoring node status.
- [21:03](https://www.youtube.com/watch?v=S6QomjOdAC0&t=1263s) Consul templates and watchers are demonstrated as the tools that enable automatic, real-time configuration file rendering and script execution.
- [27:54](https://www.youtube.com/watch?v=S6QomjOdAC0&t=1674s) The speaker explains how deployments are triggered by updating a build number in the key-value store, which in turn activates watchers on destination servers.

## Takeaways

- Use Consul's key-value store combined with watchers to achieve real-time, push-less configuration updates across distributed nodes.
- Leverage Consul templates to dynamically render configuration files for services and load balancers like HAProxy.
- Integrate health checks closely with your service discovery layer to ensure automated awareness of node availability.

## Questions this talk answers

- How does Consul compare to Zookeeper for service discovery and distributed coordination?
- How can Consul be used to implement a pull-based deployment pipeline?
- What are the benefits of using Consul watchers and templates instead of traditional configuration management tools for real-time updates?

## Technologies

Consul, Chef, Zookeeper, Docker, AWS, .NET, Java, PowerShell, Go

## Tags

configuration management, deployment pipelines, distributed systems, infrastructure automation, service discovery
