Git Product home page Git Product logo

haystack's Introduction

Build Status Docs License Join the chat at https://gitter.im/expedia-haystack/Lobby

haystack

Topmost level repository for public open source Haystack

Overview

Haystack is an Expedia-backed open source project to facilitate detection and remediation of problems with enterprise-level web services and websites.

The Problem

Modern websites rely on dozens or even hundreds of services to function. These services are often spread across many platforms, data centers, and teams. Each service logs information of various kinds:

  • Telemetry data with tags or key/value pairs associated with the event
  • Request/response logs (the XML, JSON, etc. sent to and received from the service)
  • Application logs (typically errors logged via log4j or a similar system)
  • Metrics

With so much information spread across many different places, it can be challenging and time consuming to figure out where to look for the cause of a failure or slowdown.

The Solution

Haystack uses tracing data from a central store to help you locate the source of the problem -- to drill down to the precise part of a service transaction where failures or latency are occurring -- and find the proverbial "needle in a haystack". Once you know specifically where the problem is happening, it's much easier to identify the appropriate diagnostic data, understand the data, find the problem, and fix it.

High Level Block Diagram

Infrastructure

The Haystack system includes an easy-to-use "one click" deployment mechanism, based on Kubernetes, that deploys a working development environment with working implementations of all of the services in the block diagram above. This same mechanism, with different configurations, deploys to test and production environments as well. See the collection of scripts, CloudFormation templates, and YAML files in the deployment module for details.

Kafka

Internal Kafka is the Haystack message bus. The messages that enter the Haystack system are Span objects in protobuf format, and the modules below usually communicate with each other via this message bus.

haystack-trends

The haystack-trends module detects anomalies in metrics, based on user-defined "trend templates" that define the levels at which metrics should be considered "out of trend." A single anomalous metric does not necessarily merit alarming as out of trend, so the haystack-trends unit aggregates as directed by the trend templates. For example, a particular service call might have a typical TP99 value of 100 milliseconds. ("TP" means "top percentile" and TP99 refers to the minimum time under which 99% of the calls to the service have finished.) The trend template for such a service might declare that the TP99 metric is out of trend when it exceeds 150 milliseconds, a value that was chosen to be low enough to notify interested parties of a potential problem before it becomes serious but high enough to minimize false positive alarms. The haystack-trends module stores its data in a Time Series Data Base (TSDB).

haystack-pipes

The haystack-pipes module delivers a human-friendly JSON version of Haystack spans to zero or more "durable" locations for more permanent storage. Current "plug in" candidates for such storage include:

Indexer

The Indexer module collects Span objects sharing a trace ID into SpanBuffer protobuf objects which are written to the Kafka message bus. The Span objects are identified as related by the parent span IDs; the Span with a null parent Span ID is the root Span, child Spans have a parent Span ID of the root Span, grandchild Spans have a parent span ID of the appropriate child Span, etc.

Spans

The Spans module writes Span objects into a persistent store. That persistent store consists of two pieces: the Span data is stored in Cassandra, and the Span metadata is stored in ElasticSearch. Sampling, with the ability to force storing a particular Span, will be available (under configuration) to keep the size of the Cassandra and ElasticSearch stores reasonable, given the large volume of Span objects in a production system.

Dependencies

The Dependencies module uses the parent/child relationships of Span objects to create dependency graphs for each service, stored in a graph database.

haystack-ui

The haystack-ui (User Interface) module exposes (through a website) the Spans, Stitched Spans, haystack-trends, and Dependencies created by the other modules. To simplify the API from the haystack-ui module to the Span databases, a small Query module bundles the data from the Cassandra store with the metadata from the ElasticSearch store.

haystack's People

Contributors

absrivastava avatar adriancole avatar anchaudhary avatar ashishagg avatar ayansen avatar bibinss avatar bulicekj avatar dinilatgit avatar djsutho avatar expetony avatar gitter-badger avatar jimschubert avatar jsamireddy avatar katholen avatar keshavpeswani avatar molabi avatar shellbj avatar shreyaa-sharma avatar shsethi avatar tkamenov-expedia avatar tusharbahl avatar vsen avatar williewheeler avatar worldtiki avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.