<commit_before>Sidecar ![Sidecar](views/static/Sidecar.png)
=====

[![](https://travis-ci.org/Nitro/sidecar.svg?branch=master)](https://travis-ci.org/Nitro/sidecar)
[![](https://images.microbadger.com/badges/image/gonitro/sidecar.svg)](https://microbadger.com/images/gonitro/sidecar)
[![](https://images.microbadger.com/badges/version/gonitro/sidecar.svg)](https://microbadger.com/images/gonitro/sidecar "Get your own version badge on microbadger.com")

**The main repo for this project is the [Nitro
fork](https://github.com/Nitro/sidecar)**

Sidecar is a dynamic service discovery platform requiring no external
coordination service. It's a peer-to-peer system that uses a gossip protocol
for all communication between hosts. Sidecar health checks local services and
announces them to peer systems. It's Docker-native so your containerized
applications work out of the box. It's designed to be **A**vailable,
**P**artition tolerant, and eventually consistent—where "eventually" is a very
short time window on the matter of a few seconds.

Sidecar is part of a small ecosystem of tools. It can stand entirely alone
or can also leverage:

 * [Lyft's Envoy Proxy](https://github.com/envoyproxy/envoy) - In less than
   a year it is fast becoming a core microservices architecture component.
   Sidecar implements the Envoy proxy SDS, CDS, and LDS APIs (v1). These
   allow a standalone Envoy to be entirely configured by Sidecar. This is
   best used with Nitro's
   [Envoy proxy container](https://hub.docker.com/r/gonitro/envoyproxy/tags/).

 * [haproxy-api](https://github.com/Nitro/haproxy-api) - A separation layer
   that allows Sidecar to drive HAproxy in a separate container. It also
   allows a local HAproxy to be configured against a remote Sidecar instance.

 * [sidecar-executor](https://github.com/Nitro/sidecar-executor) - A Mesos
   executor that integrates with Sidecar, allowing your containers to be
   health checked by Sidecar for both service health and service discovery.
   Also supports a number of extra features including Vault integration for
   secrets management.

 * [Superside](https://github.com/Nitro/superside) - A multi-environment
   console for Sidecar. Has a heads up display, event lists, and graphs
   showing what is happening in one or more Sidecar clusters on a live
   basis.

 * [sidecar-dns](https://github.com/relistan/sidecar-dns) - a working, but
   WIP, project to serve DNS SRV records from Sidecar services state.

 * [Traefik plugin](https://github.com/Nitro/traefik) - A fork of Traefik
   that can be backed by Sidecar. Useful as a gateway from the outside world
   into a Sidecar-based services environment. Working to get this plugin
   pushed upstream.

Overview in Brief
-----------------

Services communicate to each other through a proxy (Envoy or HAproxy) instance
on each host that is itself managed and configured by Sidecar. It is inspired
by Airbnb's SmartStack. But, we believe it has a few advantages over
SmartStack:

 * Eventually consistent model - a better fit for real world microservices
 * Native support for Docker (works without Docker, too!)
 * No dependence on Zookeeper or other centralized services
 * Peer-to-peer, so it works on your laptop or on a large cluster
 * Static binary means it's easy to deploy, and there is no interpreter needed
 * Tiny memory usage (under 20MB) and few execution threads means its very
   light weight

**See it in Action:** We presented Sidecar at Velocity 2015 and recorded a [YouTube
video](https://www.youtube.com/watch?v=VA43yWVUnMA) demonstrating Sidecar with
[Centurion](https://github.com/newrelic/centurion), deploying services in
Docker containers, and seeing Sidecar discover and health check them. The second
video shows the current state of the UI which is improved since the first video.

[![YouTube Video](views/static/youtube.png)](https://www.youtube.com/watch?v=VA43yWVUnMA)
[![YouTube Video2](views/static/youtube2.png)](https://www.youtube.com/watch?v=5MQujt36hkI)

Complete Overview and Theory
----------------------------

![Sidecar Architecture](views/static/Sidecar Architecture.png)

Sidecar is an eventually consistent service discovery platform where hosts learn
about each others' state via a gossip protocol. Hosts exchange messages about
which services they are running and which have gone away. All messages are
timestamped and the latest timestamp always wins. Each host maintains its own<commit_msg>Try to get GitHub to see drawing<commit_after>Sidecar ![Sidecar](views/static/Sidecar.png)
=====

[![](https://travis-ci.org/Nitro/sidecar.svg?branch=master)](https://travis-ci.org/Nitro/sidecar)
[![](https://images.microbadger.com/badges/image/gonitro/sidecar.svg)](https://microbadger.com/images/gonitro/sidecar)
[![](https://images.microbadger.com/badges/version/gonitro/sidecar.svg)](https://microbadger.com/images/gonitro/sidecar "Get your own version badge on microbadger.com")

**The main repo for this project is the [Nitro
fork](https://github.com/Nitro/sidecar)**

Sidecar is a dynamic service discovery platform requiring no external
coordination service. It's a peer-to-peer system that uses a gossip protocol
for all communication between hosts. Sidecar health checks local services and
announces them to peer systems. It's Docker-native so your containerized
applications work out of the box. It's designed to be **A**vailable,
**P**artition tolerant, and eventually consistent—where "eventually" is a very
short time window on the matter of a few seconds.

Sidecar is part of a small ecosystem of tools. It can stand entirely alone
or can also leverage:

 * [Lyft's Envoy Proxy](https://github.com/envoyproxy/envoy) - In less than
   a year it is fast becoming a core microservices architecture component.
   Sidecar implements the Envoy proxy SDS, CDS, and LDS APIs (v1). These
   allow a standalone Envoy to be entirely configured by Sidecar. This is
   best used with Nitro's
   [Envoy proxy container](https://hub.docker.com/r/gonitro/envoyproxy/tags/).

 * [haproxy-api](https://github.com/Nitro/haproxy-api) - A separation layer
   that allows Sidecar to drive HAproxy in a separate container. It also
   allows a local HAproxy to be configured against a remote Sidecar instance.

 * [sidecar-executor](https://github.com/Nitro/sidecar-executor) - A Mesos
   executor that integrates with Sidecar, allowing your containers to be
   health checked by Sidecar for both service health and service discovery.
   Also supports a number of extra features including Vault integration for
   secrets management.

 * [Superside](https://github.com/Nitro/superside) - A multi-environment
   console for Sidecar. Has a heads up display, event lists, and graphs
   showing what is happening in one or more Sidecar clusters on a live
   basis.

 * [sidecar-dns](https://github.com/relistan/sidecar-dns) - a working, but
   WIP, project to serve DNS SRV records from Sidecar services state.

 * [Traefik plugin](https://github.com/Nitro/traefik) - A fork of Traefik
   that can be backed by Sidecar. Useful as a gateway from the outside world
   into a Sidecar-based services environment. Working to get this plugin
   pushed upstream.

Overview in Brief
-----------------

Services communicate to each other through a proxy (Envoy or HAproxy) instance
on each host that is itself managed and configured by Sidecar. It is inspired
by Airbnb's SmartStack. But, we believe it has a few advantages over
SmartStack:

 * Eventually consistent model - a better fit for real world microservices
 * Native support for Docker (works without Docker, too!)
 * No dependence on Zookeeper or other centralized services
 * Peer-to-peer, so it works on your laptop or on a large cluster
 * Static binary means it's easy to deploy, and there is no interpreter needed
 * Tiny memory usage (under 20MB) and few execution threads means its very
   light weight

**See it in Action:** We presented Sidecar at Velocity 2015 and recorded a [YouTube
video](https://www.youtube.com/watch?v=VA43yWVUnMA) demonstrating Sidecar with
[Centurion](https://github.com/newrelic/centurion), deploying services in
Docker containers, and seeing Sidecar discover and health check them. The second
video shows the current state of the UI which is improved since the first video.

[![YouTube Video](views/static/youtube.png)](https://www.youtube.com/watch?v=VA43yWVUnMA)
[![YouTube Video2](views/static/youtube2.png)](https://www.youtube.com/watch?v=5MQujt36hkI)

Complete Overview and Theory
----------------------------

![Sidecar Architecture](views/static/Sidecar%20Architecture.png)

Sidecar is an eventually consistent service discovery platform where hosts learn
about each others' state via a gossip protocol. Hosts exchange messages about
which services they are running and which have gone away. All messages are
timestamped and the latest timestamp always wins. Each host maintains its own
{'fraction_non_alphanumeric': 0.09184703375574745, 'fraction_numerical': 0.0038129415722776717, 'mean_word_length': 4.314660309892729, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 36, 'lorem ipsum': 0, 'www.': 6, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2417970', 'n_tokens_mistral': 2576, 'n_tokens_neox': 2399, 'n_words': 1036}