Data Science

How to optimize Milvus for high-concurrency similarity search in a production environment?

DE Asked by Derek Sullivan · 14-03-2025
0 upvotes 15,304 views 0 comments
The question

We are seeing latency spikes when our user base grows. Does anyone have tips for tuning Milvus to handle thousands of concurrent queries? Specifically, we are debating between using the IVF_FLAT or HNSW index types. Which one offers the best balance of speed and recall when scaled across multiple nodes in a Kubernetes cluster?

3 answers

0
ME
Answered on 15-03-2025

In my experience, HNSW is generally superior for high-concurrency needs because it provides much faster query speeds despite a slightly higher memory footprint. When deploying on Kubernetes, ensure you are utilizing the Milvus Operator to manage your components. You should specifically look into horizontal scaling of the Query Nodes, as these are responsible for the actual search execution. Also, consider implementing a caching layer like Redis in front of your database for the most frequent queries to reduce the load. Lastly, make sure your segment sizes are optimized; having too many small segments can severely degrade search performance during high traffic periods.

0
AA
Answered on 16-03-2025

What kind of hardware are you running your Query Nodes on? Are you utilizing GPUs for index acceleration or sticking strictly to CPU-based processing?

DE 17-03-2025

We are currently on CPU-only nodes using high-memory AWS instances. I’ve heard that GPU acceleration can significantly boost throughput for certain index types, but we are worried about the cost-to-performance ratio. Have you seen a significant enough jump in queries per second to justify the switch to expensive NVIDIA instances for a standard RAG application?

0
KI
Answered on 18-03-2025

I found that tweaking the nq and topk parameters helped stabilize our latency. Sometimes the bottleneck is actually the network throughput between nodes.

ME 19-03-2025

Great point, Kimberly. I actually saw a 15% improvement in our environment just by upgrading the node-to-node networking bandwidth in our cluster configuration.

Share your thoughts

Your email address will not be published. Required fields are marked (*)

Professional Counselling Session

Still have questions?
Schedule a free counselling session

Our experts are ready to help you with any questions about courses, admissions, or career paths. Get personalized guidance from industry professionals.

Request a Call Back

Search Online

We Accept

We Accept

Follow Us

"PMI®", "PMBOK®", "PMP®", "CAPM®" and "PMI-ACP®" are registered marks of the Project Management Institute, Inc. | "CSM", "CST" are Registered Trade Marks of The Scrum Alliance, USA. | COBIT® is a trademark of ISACA® registered in the United States and other countries.

Book Free Session