Skip to content

(feat) Add MemoryCoordinator and IndexRegistry for serverless scaling#8

Merged
nknize merged 1 commit intomainfrom
memoryCoordinator
Feb 4, 2026
Merged

(feat) Add MemoryCoordinator and IndexRegistry for serverless scaling#8
nknize merged 1 commit intomainfrom
memoryCoordinator

Conversation

@nknize
Copy link
Member

@nknize nknize commented Feb 4, 2026

Introduces two new components for serverless deployments:

MemoryCoordinator:

  • Adaptive memory budget split between cache (40%) and mmap (60%)
  • Automatic rebalancing based on pressure detection
  • Workload hints (BulkIngestion, QueryHeavy, MemoryConstrained)
  • Environment variable configuration (XTREE_MEMORY_BUDGET)

IndexRegistry:

  • Lazy index loading - indexes registered as lightweight metadata
  • On-demand loading via get_or_load()
  • LRU-based cold index eviction under memory pressure
  • Manifest integration for serverless cold start
  • register_from_data_dir() for one-line initialization

Together these enable scaling to 1000+ indexes in memory-constrained serverless environments (Lambda, Cloud Run) by loading only active indexes and automatically unloading cold ones.

48 tests added, all passing.

Introduces two new components for serverless deployments:

MemoryCoordinator:
- Adaptive memory budget split between cache (40%) and mmap (60%)
- Automatic rebalancing based on pressure detection
- Workload hints (BulkIngestion, QueryHeavy, MemoryConstrained)
- Environment variable configuration (XTREE_MEMORY_BUDGET)

IndexRegistry:
- Lazy index loading - indexes registered as lightweight metadata
- On-demand loading via get_or_load<Record>()
- LRU-based cold index eviction under memory pressure
- Manifest integration for serverless cold start
- register_from_data_dir() for one-line initialization

Together these enable scaling to 1000+ indexes in memory-constrained
serverless environments (Lambda, Cloud Run) by loading only active
indexes and automatically unloading cold ones.

48 tests added, all passing.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
@nknize nknize force-pushed the memoryCoordinator branch from b484d3f to b5d330d Compare February 4, 2026 00:29
@nknize nknize merged commit 8882014 into main Feb 4, 2026
5 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant