Quickwit Search Engine

repository·main·Indexed 11 days ago

https://github.com/quickwit-oss/quickwit

A high-performance, cloud-native search engine designed for observability workloads such as log management and distributed tracing. Quickwit decouples compute from storage to optimize search directly on cloud object storage. Documentation includes deployment guides for AWS ECS via Terraform and Kubernetes via Helm, as well as internal architectural processes for managing architecture gaps and TLA+ formal specifications.

Tokens
173.1K
Snippets
516
Records
754
Agent score
95%

What's inside Quickwit

  1. Overview of OpenTelemetry Collector Proto packages

    main

    The OpenTelemetry Collector Proto package defines the protocol used for communication within the OpenTelemetry collector ecosystem. It is organized into several specialized packages:

    • common: Contains shared messages used across different services.
    • trace: Defines the Trace Service protocol messages.
    • metrics: Defines the Metrics Service protocol messages.
    • logs: Defines the Logs Service protocol messages.
  2. What is Quickwit?

    main

    Quickwit is a search engine designed to execute complex search and analytics queries directly on cloud storage (such as Amazon S3 or Azure Blob Storage) with sub-second latency. It is built in Rust and utilizes a decoupled compute and storage architecture, making it highly resource-efficient and capable of scaling to petabytes of data.

    Core Architecture Benefits

    • Decoupled Compute and Storage: Indexing and search workloads can be scaled independently.
    • Cost-Effective Storage: Data is stored once on cheap, unlimited object storage.
    • Rapid Scaling: Clusters can be scaled out in seconds without moving data.
    • Multi-tenancy: Supports tenant isolation and usage-based charging.
    • Schemaless Indexing: Allows indexing JSON documents with arbitrary fields without significant performance impact.
  3. Overview of Quickwit capabilities and use cases

    main

    Quickwit is a search engine designed to execute complex search and analytics queries directly on cloud storage with sub-second latency. It uses a decoupled compute and storage architecture powered by Rust, making it suitable for scaling to petabytes of data while remaining resource-efficient.

    Primary Use Cases

    • Log Management: Efficiently searching and analyzing large volumes of logs.
    • Distributed Tracing: Managing and querying trace data.
    • Immutable Data: Handling conversational data (emails, texts, messaging) and event-based analytics.
  4. Overview of Quickwit Features

    main

    Quickwit is a cloud-native search engine optimized for observability (logs, traces, and metrics). Key features include:

    • Search Capabilities: Full-text search and aggregation queries.
    • Cloud-Native Architecture: Decoupled compute and storage with stateless indexers and searchers. It provides sub-second search directly on cloud storage (Amazon S3, Azure Blob Storage, Google Cloud Storage, etc.).
    • Compatibility: Elasticsearch/OpenSearch compatible API and Jaeger-native/OTEL-native support for logs and traces.
    • Schema Flexibility: Supports both schemaless and strict schema indexing.
    • Integrations: Grafana data source and Kubernetes readiness via Helm charts.
    • Enterprise Features: Native support for Kafka, Kinesis, and Pulsar; multi-tenancy; retention policies; and GDPR-compliant delete tasks.
  5. Quickwit Cluster Component Overview

    main

    A Quickwit distributed cluster consists of five primary services:

    ServiceResponsibility
    SearchersExecutes search queries via the REST API.
    IndexersIngests and indexes data from data sources.
    MetastoreStores index metadata (PostgreSQL or cloud storage).
    Control PlaneSchedules indexing tasks to indexers.
    JanitorExecutes periodic maintenance (GC, retention, etc.).
  6. Key features of Quickwit

    main

    Quickwit provides several features for search, observability, and deployment:

    • Query Support: Full-text search and Elasticsearch query language support.
    • Cloud Native: Sub-second search on Amazon S3, Azure Blob Storage, and more.
    • Indexing Modes: Supports both Schemaless and strict schema indexing.
    • Observability Integrations:
      • Grafana data source
      • Jaeger-native support
      • OTEL-native for logs and traces
    • Deployment: Kubernetes ready via Helm charts.
    • Interface: RESTful API.

    Enterprise Features

    • Native Ingestion: Support for Kafka, Kinesis, and Pulsar.
    • Multi-tenancy: Indexing with multiple indexes and partitioning.
    • Data Lifecycle: Retention policies and Delete tasks (for GDPR compliance).
    • High Availability: Distributed engine that scales quickly (Note: HA indexing requires Kafka).
  7. Quickwit REST API Overview

    main

    All Quickwit REST API endpoints are prefixed with api/v1/.

    • OpenAPI Specification: Available at /openapi.json.
    • API Playground: A Swagger UI version is available at /ui/api-playground.
    • URL Encoding: Parameters passed in the URL must be properly URL-encoded using UTF-8 for non-ASCII characters.
    • Error Handling:
      • Successful requests return a 2xx HTTP status code.
      • Failed requests return a 4xx HTTP status code. The response body contains a JSON object with a message field describing the error.
    {
     "message": "Failed to parse query"
    }
  8. Use the Elasticsearch compatible API in Quickwit

    main

    Quickwit provides an Elasticsearch/OpenSearch compatible API to facilitate migrations and integrations with existing tools. Note that this API is currently incomplete; only specific endpoints are supported.

    Supported endpoints include:

    • _bulk: Batch ingestion
    • _search: Index search
    • _msearch: Multi search
    • _search/scroll: Scroll API
    • _cat: Cat API
    • _field_caps: Field capabilities API
  9. Log management with Quickwit

    main

    Quickwit is designed for efficient indexing of unstructured data and searching directly on cloud storage. It is optimized for log management use cases through native support for several ingestion protocols:

    • OpenTelemetry (OTEL): Supports both gRPC and HTTP (protobuf only) protocols.
    • REST API: Provides a REST API capable of ingesting any JSON-formatted logs.

    Because it handles unstructured data efficiently and integrates with standard observability protocols, it serves as a high-performance alternative for log storage and search.

  10. Understand the Quickwit Parquet Data Model (Point-Per-Row)

    main

    Quickwit uses a point-per-row data model for storing metrics in Parquet. Each row in a Parquet split represents exactly one data point: a single metric value at one timestamp for one timeseries.

    Key Characteristics

    • No Last-Write-Wins (LWW): Quickwit does not support LWW semantics. If two data points arrive for the same timeseries and timestamp in separate ingest requests, both are stored. There is no per-point deduplication at the storage layer.
    • No Storage-Level Interpolation: The storage layer stores raw points. Interpolation (filling gaps or aligning timestamps) is performed at query time, not during ingestion or compaction.
    • Performance: By using a point-per-row model with sorted data, Quickwit leverages columnar encodings like RLE (Run-Length Encoding) and dictionary encoding to achieve high scan performance without the complexity of nested array types.
  11. How the Control Plane schedules indexing tasks

    main

    The Control Plane is responsible for ensuring that the state of the indexers matches the desired state defined by the Metastore. It operates based on three triggers:

    1. Metastore Events: The scheduler listens for events such as source create, delete, toggle, or index delete. Upon receiving these, it generates a desired plan and sends tasks to indexers.
    2. Heartbeats (Every 3 seconds): The scheduler checks if the current tasks running on indexers are in sync with the desired plan. If they are out of sync, it reapplies the plan.
    3. Periodic Rebuild (Every minute): The scheduler rebuilds a plan using the latest Metastore state. This acts as a safety mechanism to recover from missed events due to network issues.