Zero-Downtime Full Re-Indexing: Atomic swapIndexes & Typesense Collection Aliases
MeiliSizer Blueprint Summary: Changing ranking rules, tokenizer dictionaries, or vector embedders requires a full re-index. Deleting and re-populating your live index causes 20 minutes of empty search results — unless you execute atomic Blue/Green swaps.
Sizing Peak RAM & 2x NVMe Disk During Concurrent Blue/Green Builds (MeiliSizer Guide)
During a Blue/Green rebuild, your node simultaneously serves live traffic from products_v1 (holding its working set in RAM) while building products_v2_staging on disk and inside --max-indexing-memory. This momentarily doubles on-disk LMDB/RocksDB storage and requires strict CPU thread capping (--max-indexing-threads) so Rayon indexing workers never starve Actix/HTTP search threads.
Atomic Meilisearch /swap-indexes & Typesense Alias Cutover Workflow
# 1. Build & populate staging index in background (throttled to 50% vCPUs)
# 2. Verify document count & run smoke query against products_staging_20261112
# 3. Execute atomic sub-millisecond pointer swap (Meilisearch REST API):
curl -X POST 'http://127.0.0.1:7700/swap-indexes' \
-H 'Authorization: Bearer '"$MEILI_MASTER_KEY" \
-H 'Content-Type: application/json' \
--data-binary '[{ "indexes": ["products", "products_staging_20261112"] }]'
# 4. Delete old staging index (now named products_staging_20261112) to reclaim NVMe!
MeiliSizer RAM & NVMe Tier Matrix for ATOMIC-INDEX-SWAP
| Catalog Scale | Hot Working Set | Safe Peak RAM | Matched Spec Tier |
|---|---|---|---|
| 1M Docs Blue/Green Swap (1.5 KB) | 4.6 GB Peak RAM | 60 GB NVMe Required | Hostinger KVM 4 16GB / 200GB NVMe ($10.49) |
| 5M Docs Blue/Green Swap (4.0 KB) | 30.5 GB Peak RAM | 220 GB NVMe Required | UltaHost VDS 32GB / 400GB NVMe ($58.00) |
| 20M Docs Blue/Green Swap (4.0 KB) | 64+ GB Peak RAM | 800 GB NVMe Required | UltaHost VDS 64GB / 800GB NVMe ($95.00) |
MeiliSizer Production Checklist: ATOMIC-INDEX-SWAP
- Always provision at least 2.2x your steady-state LMDB/RocksDB disk usage on NVMe to accommodate simultaneous Blue + Green indices plus snapshots.
- Cap --max-indexing-threads to 50%–65% of physical CPU cores so live keystroke p99 stays below 15ms during nightly rebuilds.
- In Typesense, point frontend clients at a Collection Alias (e.g. "products") and atomically repoint it via PUT /aliases/products.
- Wait 30 seconds after swapping before deleting the retired index so in-flight pagination requests complete cleanly.
UltaHost Dedicated VDS (Zero-Steal Cores for Typesense & Vector HNSW) — MeiliSizer Pick
100% Dedicated Physical CPU & DDR5 RAM (0% Steal) • Singapore, Tokyo, EU & US • Unmetered Traffic
Hostinger KVM DDR5 NVMe VPS (1-Click Docker / Meilisearch) — MeiliSizer Option
Up to 67% OFF + Extra 20% Partner Discount • 8GB–32GB DDR5 RAM + PCIe Gen4 NVMe for LMDB Mmap
MeiliSizer Engineering FAQ: ATOMIC-INDEX-SWAP
- Do frontend API keys or Tenant Tokens break when using Meilisearch swapIndexes?
-
Never! Because swapIndexes swaps the underlying data under the permanent "products" index UID, every frontend client, scoped API key, and signed Tenant Token keeps working with zero config reloads.
- Why did CPU steal spike my search latency to 200ms during nightly re-indexing on budget cloud?
-
Shared burstable vCPUs throttle hard after 10 minutes of 100% Rayon indexing load. Running on UltaHost Dedicated VDS (0% CPU steal) or Hostinger AMD EPYC KVM keeps live search threads responsive.