github.com/outbrain/consul@v1.4.5/website/source/intro/vs/smartstack.html.md (about)

     1  ---
     2  layout: "intro"
     3  page_title: "Consul vs. SmartStack"
     4  sidebar_current: "vs-other-smartstack"
     5  description: |-
     6    SmartStack is a tool which tackles the service discovery problem. It has a rather unique architecture and has 4 major components: ZooKeeper, HAProxy, Synapse, and Nerve. The ZooKeeper servers are responsible for storing cluster state in a consistent and fault-tolerant manner. Each node in the SmartStack cluster then runs both Nerves and Synapses. The Nerve is responsible for running health checks against a service and registering with the ZooKeeper servers. Synapse queries ZooKeeper for service providers and dynamically configures HAProxy. Finally, clients speak to HAProxy, which does health checking and load balancing across service providers.
     7  
     8  ---
     9  
    10  # Consul vs. SmartStack
    11  
    12  SmartStack is a tool which tackles the service discovery problem. It has a rather
    13  unique architecture and has 4 major components: ZooKeeper, HAProxy, Synapse, and Nerve.
    14  The ZooKeeper servers are responsible for storing cluster state in a consistent and
    15  fault-tolerant manner. Each node in the SmartStack cluster then runs both Nerves and
    16  Synapses. The Nerve is responsible for running health checks against a service and
    17  registering with the ZooKeeper servers. Synapse queries ZooKeeper for service providers
    18  and dynamically configures HAProxy. Finally, clients speak to HAProxy, which does
    19  health checking and load balancing across service providers.
    20  
    21  Consul is a much simpler and more contained system as it does not rely on any external
    22  components. Consul uses an integrated [gossip protocol](/docs/internals/gossip.html)
    23  to track all nodes and perform server discovery. This means that server addresses
    24  do not need to be hardcoded and updated fleet-wide on changes, unlike SmartStack.
    25  
    26  Service registration for both Consul and Nerves can be done with a configuration file,
    27  but Consul also supports an API to dynamically change the services and checks that are
    28  in use.
    29  
    30  For discovery, SmartStack clients must use HAProxy, requiring that Synapse be
    31  configured with all desired endpoints in advance. Consul clients instead
    32  use the DNS or HTTP APIs without any configuration needed in advance. Consul
    33  also provides a "tag" abstraction, allowing services to provide metadata such
    34  as versions, primary/secondary designations, or opaque labels that can be used for
    35  filtering. Clients can then request only the service providers which have
    36  matching tags.
    37  
    38  The systems also differ in how they manage health checking. Nerve performs local health
    39  checks in a manner similar to Consul agents. However, Consul maintains separate catalog
    40  and health systems. This division allows operators to see which nodes are in each service
    41  pool and provides insight into failing checks. Nerve simply deregisters nodes on failed
    42  checks, providing limited operational insight. Synapse also configures HAProxy to perform
    43  additional health checks. This causes all potential service clients to check for
    44  liveness. With large fleets, this N-to-N style health checking may be prohibitively
    45  expensive.
    46  
    47  Consul generally provides a much richer health checking system. Consul supports
    48  Nagios-style plugins, enabling a vast catalog of checks to be used. Consul allows for
    49  both service- and host-level checks. There is even a "dead man's switch" check that allows
    50  applications to easily integrate custom health checks. Finally, all of this is integrated
    51  into a Health and Catalog system with APIs enabling operators to gain insight into the
    52  broader system.
    53  
    54  In addition to the service discovery and health checking, Consul also provides
    55  an integrated key/value store for configuration and multi-datacenter support.
    56  While it may be possible to configure SmartStack for multiple datacenters,
    57  the central ZooKeeper cluster would be a serious impediment to a fault-tolerant
    58  deployment.