QA
Senior LevelAI, LLMs, Embeddings & MCP

How do you execute zero-downtime Vector Database Re-Indexing when upgrading embedding models?

❓ Interview Prompt: Explain upgrading embedding models, blue-green collection deployments, CDC queues, and atomic alias switching.

Upgrading an embedding model (e.g. from text-embedding-ada-002 to text-embedding-3-large) alters the vector dimension space, invalidating the entire existing vector index. Zero-Downtime Re-Indexing updates the database without dropping search availability.

Blue-Green Re-Indexing Pipeline:

1
Blue Collection (Active): Continues serving production query traffic.
2
Green Collection (Target): Create a new empty collection configured for the new embedding model dimensions.
3
CDC Queue Backfill: Re-embed all historical documents asynchronously into the Green Collection via Kafka/RabbitMQ queues.
4
Dual Writing: Write incoming document updates to both Blue and Green collections during backfill.
5
Atomic Alias Switch: Atomically swap vector database collection aliases (search_alias -> green_collection).
6
Tear down: Drop Blue Collection.

Code Implementation Example

typescript
// Qdrant atomic collection alias swap
async function swapVectorCollectionAliases(oldCollection: string, newCollection: string, aliasName: string) {
  await qdrantClient.updateCollectionAliases({
    actions: [
      { remove_alias: { alias_name: aliasName, collection_name: oldCollection } },
      { add_alias:    { alias_name: aliasName, collection_name: newCollection } }
    ]
  });
  console.log("[Vector Migration] Switched " + aliasName + " to " + newCollection + " atomically!");
}
💡Atomic vector collection alias swap for zero-downtime embedding model upgrades.
🎯 Interview Key Takeaway

Upgrade embedding models by backfilling a parallel green collection and executing an atomic alias swap for zero-downtime deployments.

#Re-Indexing#Blue-Green#Zero-Downtime#Vector DB#Senior
Back to all AI, LLMs, Embeddings & MCP Questions→

More AI, LLMs, Embeddings & MCP Interview Questions

Beginner LevelAI, LLMs, Embeddings & MCP

What are Vector Embeddings and Cosine Similarity in AI Semantic Search?

Beginner LevelAI, LLMs, Embeddings & MCP

What is the Model Context Protocol (MCP) and how does it connect LLMs to external tools?

Beginner LevelAI, LLMs, Embeddings & MCP

What is Retrieval-Augmented Generation (RAG) and how does it prevent LLM hallucinations?