freshcrate
Home > Databases > longbow

longbow

Apache Arrow Flight clustered vector cache for high throughput Agent memory sharing

Description

Apache Arrow Flight clustered vector cache for high throughput Agent memory sharing

README

CI Helm Validation Markdown Lint

Longbow

image

Longbow is a distributed, high-performance vector cache built for modern AI/Agentic workloads. It leverages zero-copy data paths, SIMD optimizations, and advanced storage backends to deliver sub-millisecond latency.

Key Features

  • High Performance: Built on Apache Arrow for zero-copy data transfer.
  • Distributed: Consistent hashing and gossip-based membership (SWIM protocol).
  • Optimized Storage: Optional io_uring WAL backend for high-throughput ingestion.
  • Hardware Aware: NUMA-aware memory allocation and SIMD vector distance calculations.
  • Smart Client: Resilient Go SDK that handles request routing transparently.

Architecture

Longbow uses a shared-nothing architecture where every node is loosely coupled.

See Architecture Guide for a deep dive.

Getting Started

Prerequisites

  • Go 1.25+
  • Linux (recommended for best performance) or macOS

Installation

git clone https://github.com/23skdu/longbow.git
cd longbow
go build -o bin/longbow ./cmd/longbow

Running a Local Cluster

./scripts/start_local_cluster.sh

Running Benchmarks

Longbow includes a distributed benchmark tool:

go build -o bin/bench-tool ./cmd/bench-tool
./bin/bench-tool --mode=ingest --concurrency=4 --duration=10s

Configuration

Longbow is configured via environment variables. See Configuration for details.

Notable flags:

  • STORAGE_USE_IOURING=true (Enable new Linux storage engine)

  • LONGBOW_GOSSIP_ENABLED=true (Enable distributed discovery)

  • Protocol: Apache Arrow Flight (over gRPC/HTTP2).

  • Search: High-performance HNSW vector search with hybrid (Dense + Sparse) support and polymorphic vector types.

  • Distance Metrics: Pluggable metrics (Euclidean, Cosine, Dot Product) with SIMD optimizations for all supported types.

  • Filtering: Metadata-aware predicate filtering for searches and scans.

  • Lifecycle: Support for vector deletion via tombstones.

  • Durable: WAL with Apache Parquet format snapshots.

  • Storage: In-memory ephemeral storage for zero-copy high-speed access.

  • Observability: Structured JSON logging and 100+ Prometheus metrics.

Supported Data Types & Dimensions

Longbow supports the following vector data types with optimized SIMD kernels:

Data Type Dimensions Supported Notes
float32 128, 256, 384, 768, 1024, 1536, 2048, 3072 Full SIMD optimization
float16 128, 256, 384, 768, 1024, 1536, 2048, 3072 Metal GPU FP16 kernels
float64 128, 256, 384, 768, 1024, 1536, 2048, 3072 Full SIMD optimization
int8 128, 256, 384, 768, 1024, 1536, 2048, 3072 AVX2/NEON optimized
int16 128, 256, 384, 768, 1024, 1536, 2048, 3072 AVX2/NEON optimized
int32 128, 256, 384, 768, 1024, 1536, 2048, 3072 AVX2/NEON optimized
int64 128, 256, 384, 768+ Generic SIMD
uint8 128, 256, 384, 768+ Generic SIMD
uint16 128, 256, 384, 768+ Generic SIMD
uint32 128, 256, 384, 768+ Generic SIMD
complex64 128, 256, 384, 768, 1024, 1536, 2048, 3072 Full SIMD optimization
complex128 128, 256, 384, 768+ Generic SIMD
turboquant 128, 256, 384, 768+ NEON FWHT optimized

Optimized Kernel Dimensions

The following dimensions have dimension-specific optimized kernels:

Dimension Block Size Optimization
128 N/A Direct SIMD unroll
256 N/A Direct SIMD unroll
384 N/A AVX2/NEON specific kernels
768 256 Blocked SIMD
1024 256 Blocked SIMD
1536 256 Blocked SIMD
2048 512 Blocked SIMD
3072 512 Blocked SIMD

Architecture & Ports

To ensure high performance under load, Longbow splits traffic into two dedicated gRPC servers:

  • Data Server (Port 3000): Handles heavy I/O operations (DoGet, DoPut, DoExchange).
  • Meta Server (Port 3001): Handles lightweight metadata operations (ListFlights, GetFlightInfo, DoAction).

Why? Separating these concerns prevents long-running data transfer operations from blocking metadata requests. This ensures that clients can always discover streams and check status even when the system is under heavy write/read load.

Observability & Metrics

Longbow exposes Prometheus metrics on a dedicated port to ensure observability without impacting the main Flight service.

  • Scrape Port: 9090
  • Scrape Path: /metrics

Custom Metrics

Key Metrics

Metric Name Type Description
longbow_flight_ops_total Counter Total number of Flight operations (DoGet, DoPut, etc.)
longbow_flight_duration_seconds Histogram Latency distribution of Flight operations
longbow_flight_rows_processed_total Counter Total rows processed in scans and searches
longbow_hnsw_search_duration_seconds Histogram Latency of k-NN search operations
longbow_hnsw_node_count Gauge Current number of vectors in the index
longbow_tombstones_total Gauge Number of active deleted vector tombstones
longbow_index_queue_depth Gauge Depth of the asynchronous indexing queue
longbow_memory_fragmentation_ratio Gauge Ratio of system memory reserved vs used
longbow_wal_bytes_written_total Counter Total bytes written to the WAL
longbow_snapshot_duration_seconds Histogram Duration of the Parquet snapshot process
longbow_evictions_total Counter Total number of evicted records (LRU)
longbow_ipc_decode_errors_total Counter Count of IPC decoding errors or panics

For a detailed explanation of all 100+ metrics, see Metrics Documentation.

Standard Go runtime metrics are also exposed.

Usage

Running locally

go run cmd/longbow/main.go

Docker

docker build -t longbow .
docker run -p 3000:3000 -p 3001:3001 -p 9090:9090 longbow

Documentation

Release History

VersionChangesUrgencyDate
0.1.8 Temporal & Hybrid Query Capabilities Beyond simple vector search, the engine now supports temporal queries (filtering by time-ranges) and a new Recommend API that uses hybrid scoring to combine vector similarity with metadata relevance. More Parquet I/O Native support for Parquet/Arrow IPC allows for zero-copy data import and export. Native GPU-Accelerated HNSW Construction: We transitioned from external libraries (FAISS) to raw, hand-optimized CUDA and Metal kernels. This enables signifHigh4/17/2026
0.1.7Release Notes v0.1.7 The v0.1.7 release of Longbow represents a foundational leap in processing performance and scalability. This release introduces comprehensive GPU acceleration, refined resource management, and optimized SIMD kernels, alongside new indexing and search flexibility. $ docker pull ghcr.io/23skdu/longbow:0.1.7 Major Architectural Changes Comprehensive GPU Abstraction: Introduced a unified architecture for GPU acceleration, natively supporting Apple Metal (ARM64) and NVIDIMedium3/28/2026
0.1.6<img width="782" height="795" alt="image" src="https://github.com/user-attachments/assets/05f64080-a707-4a19-9353-da981062c7ff" /> Low2/2/2026
0.1.5 <img width="1960" height="764" alt="image" src="https://github.com/user-attachments/assets/0f5d5ec8-1cab-4f6b-a703-8a1057af9716" /> **Full Changelog**: https://github.com/23skdu/longbow/compare/0.1.3...0.1.5Low1/26/2026
0.1.3🚀 Performance & Scale Native FP16 Storage: Reduces vector memory footprint by 50% and increases search QPS by ~1.4x via better cache locality and SIMD optimizations. Zero-Copy Architecture: Implemented Arena allocation for graph data and pooled buffers to significantly reduce Garbage Collection (GC) overhead. Vectorized Filtering: New recursive logic for metadata filtering improves speed on complex queries. 🛡️ Reliability & Stability Concurrency Hardening: Resolved critical race conditionLow1/10/2026
0.1.2 <img width="799" height="634" alt="image" src="https://github.com/user-attachments/assets/401e5551-d41a-4c4a-b133-c5fd7a7f4d2d" /> **Full Changelog**: https://github.com/23skdu/longbow/compare/v0.1.1...0.1.2Low1/6/2026
v0.1.1v0.1.1 (2025-12-22) This release marks a major architectural evolution, transforming Longbow from a single-node engine into a distributed, fault-tolerant cluster system. It introduces a custom SWIM-based Gossip protocol, hybrid CPU/GPU search acceleration, and production-grade reliability controls. Top Features Distributed Mesh Clustering (SWIM): Implemented a proprietary, eventually consistent cluster membership protocol based on SWIM (Scalable Weakly-consistent Infection-style Process GroLow12/23/2025
0.1.0Core Capabilities: Advanced Search Modes: Dense Search: High-speed approximate nearest neighbor retrieval using the HNSW algorithm. Sparse Search: Keyword-based search using an in-memory inverted index with TF-IDF scoring. Hybrid Search: Combines Dense and Sparse results using Reciprocal Rank Fusion (RRF) for superior relevance. Metadata Filtering: Integrated predicate-based filtering (e.g., id > 100) allowing for complex hybrid queries during both scans (DoGet) and vector searches. LifecyLow12/20/2025
0.0.9Major New Features!! Hybrid Search (BM25 + Vector) with RRF/Linear/Cascade fusion Adaptive Indexing - Auto-switch BruteForce/HNSW Flight Client Pool - Foundation for peer-to-peer vector mesh HNSW Auto-Sharding - Automatic migration at 10k vectors NUMA-Aware Memory - Multi-socket server optimization Low12/19/2025
0.0.8## 🏹 Longbow 0.0.8 New Features ! S3 snapshot backend HNSW scratch pool (sync.Pool) WAL double-buffer (allocation churn fix) Hybrid search with RRF SIMD vector math Sharded locking Async indexing pipeline Memory pooling Graceful shutdown with WAL truncation Helm Updates: Helm Chart (0.0.4) released Add S3 backend configuration in values.yaml Support existingSecret for S3 credentials Add config section for maxMemory, maxWALSize, snapshotInterval, ttl Update deployment.yaml with alLow12/16/2025
0.0.7🚀 New Features DuckDB Integration: Added DuckDB adapter for analytics on parquet snapshots, including zero-copy Arrow return support. Parquet Snapshots: Full implementation of Parquet snapshots and adapter logic. HNSW Index: Implemented zero-copy HNSW index for efficient vector search. Metrics: Exposed vector index and system metrics; updated metrics documentation. Filtering: Implemented timestamp column and filtering logic. Helm: Updated Helm charts for split persistence. 🐛 Bug Fixes Low12/15/2025
0.0.6Tag: 0.0.6 Commit: dc795b2 This release focused data durability, connection stability, and schema flexibility. **New Features Schema Evolution & Versioning Dynamic Schema Updates: Longbow now supports additive schema changes. You can add new columns to existing datasets without downtime or write rejections. Dataset Versioning: The system now automatically tracks dataset versions, incrementing them upon successful schema evolution. gRPC Keep-Alive Configuration Connection Stability: ALow12/14/2025

Dependencies & License Audit

Loading dependencies...

Similar Packages

mddbA minimal, lightweight structured data store designed for small applications, scripts and automation workflows. Built for simplicity, portability and low overhead.v2.9.14
raptorNo descriptionmain@2026-04-21
NornicDBNornicdb is a low-latency, Graph + Vector, Temporal MVCC with all sub-ms HNSW search, graph traversal, and writes. Uses Neo4j Bolt/Cypher and qdrant's gRPC drivers so you can switch with no changes. Tv1.0.42-hotfix
PageIndex📑 PageIndex: Document Index for Vectorless, Reasoning-based RAGmain@2026-04-10
oasisdbOasisDB: A minimal and lightweight vector databasev0.1.2