Scaling HNSWs

AI-generated summary of reporting by Simon Willison’s Weblog. Read the original for the full story.

Why it matters

Redis 8's vector sets can now scale to hundreds of millions of vectors across nodes, with parallel reads and writes, giving engineers a practical sharding recipe for embedding search.

Read this as

Redis, a popular open-source database, added a feature called vector sets in its version 8 release in May. Vectors are long number lists that computers use to compare things like text or images for similarity. Redis's creator wrote a detailed guide explaining how to spread huge collections of these vectors across many servers, so searches and updates can run in parallel instead of on one overloaded machine.

Redis 8's vector sets, shipped in May, now include documented techniques for scaling similarity search across many Redis instances: clients can fan a query out to N servers and merge scored results, and hash writes modulo N to parallelize indexing. Teams running embedding search at hundreds-of-millions scale gain a free, well-explained scaling path instead of adopting a separate vector database. Competitors like Pinecone and pgvector face price pressure.

Salvatore Sanfilippo details his HNSW implementation in Redis 8's vector-sets module (hnsw.c, vset.c), including contributions around efficient deletion and updating of existing indexes, historically a weak spot of HNSW. For scaling, VSIM queries against partitioned instances can return WITHSCORES (cosine distance) for client-side merge, and parallel queryable via multiplexing; writes shard by hashing the element modulo N across instances. No benchmark numbers are given.

Read the original

This summary exists to save you time, not to replace the source.

Key terms

Redis Redis 8 HNSW vector sets VSIM

Was this summary useful?

One click, anonymous. It tells us which summaries to re-run.

Related reading