pgvector Semantic Search
A production semantic-search stack that keeps vectors next to your product data. PostgreSQL pgvector stores embeddings with HNSW indexes; SQL filters (tenant, price, stock) run in the same query. Redis caches hot embedding lookups and ranked result pages so you do not re-embed or re-rank on every keystroke.
Architecture Diagram
Interactive — hover over any node to see its role and description.
Use Cases
Technology Stack
frontend
backend
database
infrastructure
ai
Scalability Roadmap
One RDS instance. ivfflat index is enough under ~1M vectors. Redis on the same VPC.
Switch to HNSW. Read replica for search traffic. Dedicated Redis for cache.
Aurora PostgreSQL. Partition pgvector tables by tenant. Parallel ingest workers.
Write region plus pgvector read replicas per continent. Redis Cluster per region for sub-50ms cache hits.
Cost Breakdown
Development Cost
$8,000 – $22,000 (6–12 weeks)
Infrastructure Cost
$120 – $1,800/month (RDS + Redis + embedding API)
Maintenance Cost
$1,000 – $3,000/month for index tuning, ingest, and eval sets
Security Considerations
More Architectures
Redis Caching Platform
Cache-aside, write-through, sessions, and hot-key protection
Data InfrastructureMulti-Region Database
Aurora Global, regional failover, and reads close to the user
Data InfrastructureRate Limiting & Session Store
Sliding windows, API keys, and sticky sessions on Redis
Need This Architecture Built?
Get a detailed architecture plan, technology recommendations, development roadmap, and infrastructure estimation for your project.