Vector
Audited from github.com/vectordotdev/vector
High-performance, end-to-end observability data pipeline for collecting, transforming, and routing logs, metrics, and traces.
- Language
- Rust
- Hosting
- Docker
- License
- MPL-2.0
- Running for
- 6 years
- Team
- 21-100 people
Why this architecture
Vector replaces resource-intensive logging agents and aggregators with a fast, memory-safe Rust binary capable of processing millions of events per second.
Tech stack by layer
6 technologies · audited Sep 17, 2026- OpenTelemetryStandardized telemetry data protocol parser and emitter for logs, metrics, and distributed traces
- PrometheusMetrics ingestion parser and scrape endpoint exporter with native histogram and summary support
- DockerMulti-arch container images running as lightweight host agents or centralized aggregator services
- KubernetesNative daemonset and sidecar integration with container log discovery and pod metadata enrichment
Vector architecture diagram
Open SVGDiagram as text
- Sources (logs · metrics · traces) → Vector agent (per host · Kubernetes): collect
- Vector agent (per host · Kubernetes) → Vector aggregator (central): forward
- Vector agent (per host · Kubernetes) → Transforms (VRL): remap
- Vector aggregator (central) → Buffers (memory / disk): queue
- Vector aggregator (central) → Sinks (OTel · Prometheus · stores): deliver · ack
Key architectural decisions
4 decisions- 01
Vector Remap Language (VRL) Embedded Engine
Implements a custom sandboxed, type-safe expression language (VRL) for parsing, enriching, and mutating logs and metrics at line-rate without garbage collection pauses.
- 02
End-to-End Delivery Acknowledgements
Employs an internal topology acknowledgement coordinator that guarantees delivery across sources, in-memory/on-disk buffers, and external sinks.
- 03
Dual Role Deployment Topology (Agent & Aggregator)
Packages a single compiled binary that operates either as a low-overhead local node daemon or as a clustered, horizontal aggregator tier.
- 04
Composable Component Architecture
Modularizes the pipeline into distinct sources, transforms, and sinks with unified internal log, metric, and trace event schemas.
How Vector is built
How Vector is structured
Vector is architected as a modular Rust Cargo workspace divided between the core daemon binary and specialized internal libraries:
src/: Contains the Vector CLI, runtime lifecycle orchestration, configuration loader, pipeline topology graph builder, and component registry.lib/vector-core: Defines the internal unified data model representing log events, metric series (counters, gauges, sets, distributions, sketches), and trace spans.lib/vector-vrl: Houses the parser, compiler, standard library, and runtime evaluator for the Vector Remap Language (VRL).lib/vector-buffers: Implements backpressure-aware buffer queues supporting both volatile in-memory circular rings and durable disk-backed storage.lib/codecs: Encoders and decoders for wire protocols including JSON, NDJSON, Syslog, Apache Avro, Apache Arrow, Parquet, and OpenTelemetry Protobuf.lib/file-source: High-performance filesystem tailing engine with inode tracking, file rotation handling, and checkpoint persistence.
Frontend
As an infrastructure data pipeline daemon, Vector does not serve an interactive end-user web GUI directly from its binary:
- CLI Utilities & TUI: Vector provides an integrated terminal interface (
vector topandvector tap) allowing operators to observe live pipeline topology throughput, buffer utilization, and inspect live data streams matching filter patterns. - Documentation & Playground Website: The documentation portal (
website/) is built with Hugo, Alpine.js, and Tailwind CSS, featuring an interactive WebAssembly-powered VRL playground for real-time expression testing. - GraphQL & REST Admin API: An embedded Axum/Hyper HTTP server exposes runtime status, schema validation, and health checks for integration with monitoring dashboards.
Backend & APIs
Vector's internal engine executes pipelines organized into directed acyclic graphs (DAGs) of streaming components:
- Sources: Ingestion handlers that consume events from over 40 sources, including syslog listeners, HTTP endpoints, Kubernetes container logs, Kafka topics, and AWS CloudWatch.
- Transforms: Real-time processing nodes that mutate events using VRL, filter events by predicate, sample high-volume streams, or aggregate log events into metrics.
- Sinks: Outbound egress handlers that batch, compress (gzip, zstd, snappy), and transmit data to destinations such as ClickHouse, Elasticsearch, AWS S3, Datadog, Prometheus, Kafka, and Loki.
- End-to-End Acknowledgements: Vector propagates delivery confirmations backwards through the DAG, ensuring data is only acknowledged at the source once safely flushed to sinks or durable buffers.
Data & persistence
Vector processes ephemeral telemetry streams in memory but provides robust disk-based persistence for operational resilience:
- Durable Disk Buffers: When configured with
type = "disk", incoming events are persisted into write-ahead log structures on disk before processing, surviving process crashes and downstream outages without message loss. - Checkpoints & Offsets: Source position checkpoints (such as file cursor byte offsets or Kafka partition offsets) are saved periodically to state directories (
/var/lib/vector) to prevent duplicate ingestion upon restarts. - Zero Database Dependency: Vector does not require an external relational database or key-value store, keeping its operational footprint self-contained and zero-configuration.
Realtime / collaboration
Vector operates as a high-throughput streaming router engineered for sub-millisecond latency:
- Zero-Copy Streaming: Pipelines use Tokio asynchronous channels and
bytes::Bytesreference-counted memory buffers to minimize copying during network packet deserialization and routing. - Dynamic Topology Reload: Operators can trigger pipeline updates with
SIGHUPor via the HTTP API, allowing Vector to re-read configuration, warm up new sinks, and cleanly drain deprecated pipelines without dropping active connections. - Live Event Tapping: The embedded API allows authenticated administrators to attach live taps onto intermediate pipeline stages for real-time debugging without interrupting data delivery.
Build, test & deploy
The build and test pipeline is optimized for rigorous cross-platform validation:
- Cargo & Mold Linker: Uses modern Rust toolchains with
moldlinker in Docker for fast release compilation and link-time optimization (lto = "fat"). - Extensive Test Framework: Validates correctness using
cargo-nextest, property-based testing withproptest, and dedicated end-to-end integration tests (tests/integration,tests/antithesis) verifying crash recovery under simulated hardware faults. - Multi-Platform Packages: Generates native Debian/Ubuntu (
.deb), RPM (.rpm), Alpine APK, macOS Homebrew, and static musl binaries alongside multi-architecture container images.
Self-hosting notes
Operating Vector in production requires selecting an appropriate deployment topology:
- Agent Mode: Deployed on individual virtual machines or as Kubernetes DaemonSets to collect local host metrics and tail container log files directly from
/var/log/pods. - Aggregator Mode: Deployed as a horizontally scaled cluster behind a network load balancer to terminate incoming TLS connections, perform heavyweight VRL transformations, and manage batch uploads to long-term storage sinks.
- Resource Management: Configure
data_diron persistent, high-IOPS storage when enabling disk buffers, and set memory limits according to anticipated burst sizes and batch buffers.
What to copy (and what not to)
Architectural patterns from Vector worth adopting:
- Vector Remap Language (VRL) Model: Embedding a custom, domain-specific language designed specifically for event mutation provides immense flexibility while maintaining memory safety and predictability.
- End-to-End Acknowledgment Tracking: Propagating delivery status backwards across asynchronous channel pipelines is an exemplary design for mission-critical ingestion systems.
- Feature-Gated Component Compilation: Using Cargo feature flags to compile only desired sources and sinks allows building minimal, hyper-focused binaries when binary size matters.
Patterns to avoid or treat with caution:
- Monolithic Component Matrix: Implementing dozens of proprietary cloud vendor sinks directly in the main codebase introduces immense dependency maintenance overhead; external plug-in architectures (such as WASM-based transforms) are often preferable for newer projects.
Sources & repo audit
- Cargo.toml (Root workspace manifest defining core dependencies and compiler flags)
- lib/codecs/Cargo.toml (Encoding and decoding codecs for syslog, protobuf, avro, and json)
- regression/Dockerfile (Production multi-stage build using mold linker and debian-slim)
Independent analysis of repository at github.com/vectordotdev/vector. Spotted an inaccuracy? Use the claim form to request a correction.
Show this stack on your README or website
[](https://stackitfast.com/project/vector)Paste it into your README. It shows your current stack and links to this page.
Scaffold it with your agent
Paste this prompt into Claude Code, Cursor, Windsurf or AGY to start a project with Vector's architecture.
- 1Copy the promptThe full markdown spec, with every layer and decision.
- 2Open your AI toolClaude Code, Cursor, Windsurf or Copilot, in a new repo.
- 3Paste and scaffoldUse it as the first instruction; review before you ship.
# MISSION: Scaffold "Vector" Production Architecture
You are an expert Senior Staff Software Architect and Full-Stack Engineer. Your mission is to scaffold and implement a production-grade, highly reliable, and modular codebase following the proven architecture of **Vector**.
---
## 1. PROJECT SPECIFICATIONS & BENCHMARK
- **Reference Architecture**: Vector
- **What It Does**: High-performance, end-to-end observability data pipeline for collecting, transforming, and routing logs, metrics, and traces.
- **Domain & Category**: Observability Data Router & Telemetry Pipeline
- **Production Scale**: 21-100 people
- **Development Mode**: CLASSIC
- **Architectural Rationale**: Vector replaces resource-intensive logging agents and aggregators with a fast, memory-safe Rust binary capable of processing millions of events per second.
- **Live Website Reference**: https://vector.dev
- **Source Repository**: https://github.com/vectordotdev/vector
---
## 2. PRODUCTION TECH STACK
- **Full Stack Array**: Rust, Tokio, OpenTelemetry, Prometheus, Docker, Kubernetes
- **Primary Language(s)**: Rust, CUE, HTML, TypeScript, JavaScript, Shell
- **License of the reference repo**: MPL-2.0
- **Backend & APIs**: Rust — Systems programming language powering the high-throughput, memory-safe data processing engine; Tokio — Asynchronous event loop driving non-blocking streaming I/O across network sources and sinks
- **Data & persistence**: OpenTelemetry — Standardized telemetry data protocol parser and emitter for logs, metrics, and distributed traces; Prometheus — Metrics ingestion parser and scrape endpoint exporter with native histogram and summary support
- **Infrastructure & deploy**: Docker — Multi-arch container images running as lightweight host agents or centralized aggregator services; Kubernetes — Native daemonset and sidecar integration with container log discovery and pod metadata enrichment
---
## 3. KEY ARCHITECTURAL DECISIONS (audited from https://github.com/vectordotdev/vector @ e5ede4e)
1. **Vector Remap Language (VRL) Embedded Engine**: Implements a custom sandboxed, type-safe expression language (VRL) for parsing, enriching, and mutating logs and metrics at line-rate without garbage collection pauses.
2. **End-to-End Delivery Acknowledgements**: Employs an internal topology acknowledgement coordinator that guarantees delivery across sources, in-memory/on-disk buffers, and external sinks.
3. **Dual Role Deployment Topology (Agent & Aggregator)**: Packages a single compiled binary that operates either as a low-overhead local node daemon or as a clustered, horizontal aggregator tier.
4. **Composable Component Architecture**: Modularizes the pipeline into distinct sources, transforms, and sinks with unified internal log, metric, and trace event schemas.
---
## 4. NON-NEGOTIABLE ARCHITECTURAL GUARDRAILS
1. **Monorepo & Modular Separation**:
- Structure as a Turborepo monorepo with strict package boundaries:
- `apps/web`: Application UI, routing, layouts, and server endpoints.
- `packages/ui`: Shared design tokens, CSS variables, and Radix UI primitive components.
- `packages/db`: Database schemas, client singleton, declarative migrations, and seed scripts.
- `packages/config`: Shared TypeScript, ESLint, and build configurations.
2. **Strict Type Safety & Zero `any` Policy**:
- Enable `strict: true`, `noImplicitAny: true`, and `strictNullChecks: true`.
- Validate ALL external inputs, API request bodies, and query parameters with **Zod** schemas before execution.
3. **Frontend & Rendering Guidelines**:
- Isolate interactive UI state to leaf components. Keep core pages lightweight and performant.
4. **Design System & Aesthetics**:
- Keep every color, radius, shadow and font in a single token file (CSS variables) and consume tokens everywhere; never hardcode hex values in components.
- Prefer crisp 1px borders and one subtle shadow scale over blurry default shadows. Pair one sans-serif for body/headings with one monospace for tags, badges, metrics, and code.
5. **Data Layer & Reliability**:
- Write declarative schema definitions with foreign keys, composite indexes on queried filters, and automated timestamp triggers.
- Use connection pooling and prepared statements for serverless database execution.
---
## 5. STEP-BY-STEP SCAFFOLDING ROADMAP
- **Phase 1: Workspace & Root Config**: Initialize package manager, monorepo configuration (`turbo.json`, `tsconfig.base.json`, `package.json`).
- **Phase 2: Database Schema & Client**: Set up the data layer (OpenTelemetry, Prometheus): client, connection pool, models, and migration scripts.
- **Phase 3: Design Tokens & UI Primitives**: Build accessible `Button`, `Input`, `Card`, `Badge`, and layout wrappers inside `packages/ui`.
- **Phase 4: Core Application Routes & Handlers**: Implement primary authentication, user session handling, and application routes.
- **Phase 5: Quality Assurance & Build Verification**: Run `tsc --noEmit`, ESLint, Prettier, and smoke test suites to ensure zero compilation or runtime errors.
---
## 6. EXECUTION INSTRUCTIONS
1. Review all specifications, architectural guardrails, and stack choices above.
2. Present the full monorepo directory tree structure.
3. Systematically generate the complete, production-ready codebase according to the 5-phase roadmap above — starting with the root workspace setup, followed by the database schema, UI design system package, and full-stack application routes until the repository is fully scaffolded and ready to run.Frequently asked about Vector
How does Vector achieve higher throughput than Logstash or Fluentd?
Vector is written in Rust without a runtime garbage collector, leveraging Tokio for asynchronous zero-copy network I/O, custom SIMD-accelerated parsers, and efficient memory pooling.
Does Vector support disk buffering to prevent data loss during downstream outages?
Yes, Vector includes configurable on-disk queue buffers that stage events durably when downstream endpoints experience downtime or backpressure.
One email a month: new deep dives and stack trends
New source-audited architectures, head-to-head comparisons and the monthly stack report. No spam, unsubscribe anytime.
Similar architectures
- RustFSClassicS3-Compatible Object Storage · 20+ peopleShares Rust · Tokio · Docker
- SurrealDBClassicMulti-Model Real-Time Database · 20+ PeopleShares Rust · Tokio · Docker
- OpenObserveClassicCloud-Native Observability Engine · 6-20 PeopleShares Rust · Tokio · OpenTelemetry
- QdrantClassicVector Similarity Search Engine · 20+ PeopleShares Rust · Tokio · Docker
- MeilisearchClassicSearch Engine · 20+ peopleShares Rust · Tokio · Docker
- BrowserSkillClassicBrowser Automation Bridge for AI Agents · 6-20 peopleShares Rust · Tokio