Components of Thanos

Thanos is composed of several components that work together to provide a scalable and highly available Prometheus setup with long-term storage capabilities. The following are the main components of Thanos:

  1. Thanos Sidecar: A component that runs as a sidecar in Kubernetes pods to collect and forward metrics to Thanos. It also performs some basic filtering and compression of the metrics data.
  2. Thanos Query API: A component that provides a query API for querying and aggregating time series data from multiple Prometheus instances. It also supports various querying and aggregation functions.
  3. Thanos Compactor: A component that compacts and merges time series data from multiple Prometheus instances to reduce storage usage and improve query performance.
  4. Thanos Object Store: A component that provides a scalable and durable object store for storing and retrieving time series data. It supports various object store backends like Google Cloud Storage, Amazon S3, and Azure Blob Storage.
  5. Thanos Ruler: A component that provides a rule engine for alerting and notification based on PromQL queries. It also supports various notification channels like email, Slack, and PagerDuty.

Deployment Options for Thanos

Thanos supports various deployment options to suit different use cases and requirements. The following are some common deployment options:

  1. On-premises: Thanos can be deployed on-premises using Kubernetes or other container orchestration platforms. This deployment option provides full control over the infrastructure and data, but requires more resources and maintenance.
  2. Multi-cloud: Thanos can be deployed across multiple public clouds to provide high availability and disaster recovery capabilities. This deployment option requires more complex setup and configuration, but provides better resilience and scalability.
  3. Hybrid cloud: Thanos can be deployed in a hybrid cloud environment, where some components are running on-premises and others are running in the cloud. This deployment option provides a balance between control and scalability, but requires more integration and coordination between the on-premises and cloud components.

Philosophy of Thanos

Thanos is designed to provide a scalable and highly available Prometheus setup with long-term storage capabilities while retaining Prometheus’s reliability properties. Its philosophy is based on the following principles:

  1. Simplicity: Thanos is designed to be simple to use and deploy, with minimal configuration required.
  2. Compatibility: Thanos is designed to be compatible with Prometheus and its ecosystem, including PromQL and Alertmanager.
  3. Flexibility: Thanos is designed to be flexible and extensible, with support for various deployment options and object store backends.
  4. Performance: Thanos is designed to be performant, with support for querying and aggregating time series data from multiple Prometheus instances in parallel.
  5. Scalability: Thanos is designed to be scalable, with support for handling large amounts of metrics data and queries.

Sources