DBRaven
Workload · mixed

AI Embedding Lookup

read heavy

Summary

Vector similarity search for semantic retrieval across millions of high-dimensional embeddings. Each query computes approximate nearest neighbors against a vector index that must fit in RAM for acceptable latency. Index build is expensive; incremental updates require re-indexing strategies.

Example Systems

  • ·RAG pipeline retrieval layer
  • ·Semantic search for documents
  • ·Recommendation engine (item similarity)
  • ·Image similarity search
  • ·Code search by semantic meaning

Characteristics

CategoryMIXED
Read / write patternread heavy
Latency requirementlow
Consistency requirementeventual
Durability requiredYes
Ordering requiredNo

Capacity

Typical RPS1,000
Peak RPS10,000
Typical data volume500 GB
Growth rate10-100 GB/month depending on embedding dimensionality and corpus size
Seasonal spikes: User query spikes driven by LLM-powered product features and viral usage (10× multiplier)

Access Patterns

point lookuppoint lookup

Recommended Patterns

cache asidecqrsshardingbulkhead isolation

Patterns to Avoid

two phase commit

Basis

Vector search workloads are relatively new but well-characterized in pgvector, Pinecone, and Weaviate documentation

Related Architecture Knowledge

Outbound: this entity affects

Benefits FromPattern
vector similarity search
Grounded

AI embedding lookup workloads are the primary use case for vector similarity search; nearest-neighbor retrieval over high-dimensional embedding spaces requires ANN indexes to achieve sub-second latency.

Full relationship →
Vulnerable ToFailure Mode
embedding drift
Grounded

AI embedding lookup workloads are directly vulnerable to embedding drift when source content changes without triggering re-embedding, silently degrading retrieval quality without any error signal.

Full relationship →
Vulnerable ToFailure Mode
memory pressure oom
Grounded

AI embedding lookup workloads require the entire vector index to reside in RAM for acceptable latency. When the index size grows beyond available memory, the OS begins paging the HNSW graph to disk, causing query latency to degrade from milliseconds to seconds and eventually OOM-killing the process.

Tradeoffs

  • ·Quantization reduces memory by 4-8x but degrades recall slightly: evaluate recall impact before deploying
  • ·IVFFlat has lower memory than HNSW but requires training (cluster computation) when adding new vectors
  • ·Horizontal scaling (shard vectors across instances) reduces per-node memory at the cost of scatter-gather query overhead
Full relationship →

Used In Architecture Scenarios

AI Retrieval-Augmented Generation Platformhigh

AI / RAG Application

A Retrieval-Augmented Generation (RAG) architecture that combines vector similarity search for semantic document retrieval with relational metadata filtering, using PostgreSQL with pgvector as the unified store for both embeddings and structured data. Redis provides a semantic cache to avoid redundant embedding model inference and reduce vector index query load for repeated or similar queries. Kafka manages the asynchronous embedding generation pipeline that keeps the vector index current as source documents are added or updated.

ML Feature Serving Platformexpert

AI / RAG Application

A low-latency feature serving platform for ML model inference, providing both batch (offline) and real-time (online) feature access with strict training-serving consistency. Redis serves the hot feature cache with p99 latency targets below 5ms for online inference requests; PostgreSQL provides point-in-time feature lookups for offline training jobs with temporal consistency guarantees; Cassandra stores high-cardinality feature entities at write scale beyond PostgreSQL's single-primary ceiling; Kafka streams feature computation events from online feature pipelines to update the cache; Qdrant stores vector features for embedding-based model inputs and similarity lookups; ClickHouse serves feature analytics and drift monitoring across training dataset populations. Feature versioning is first-class: every feature value is tagged with a pipeline_version and computed_at timestamp to support model reproducibility and training-serving skew diagnosis.