Infrastructure configuration associated with a namespace.
Defines infrastructure resources for a specific namespace. This configuration
can override organization-level defaults, enabling flexible deployment patterns
where different namespaces use different infrastructure.
Resolution Priority:
When a namespace has infrastructure configured with DEDICATED tier, it takes
precedence over organization-level infrastructure. This allows:
- ENTERPRISE org with SHARED namespace (cost savings for dev/test)
- ENTERPRISE org with dedicated GPU namespace (ML workloads)
- Mixed infrastructure within a single organization
Tier Behaviors:
SHARED:
- Namespace uses organization infrastructure (if configured)
- Falls back to Mixpeek's shared infrastructure
- All infrastructure URLs should be None
- Lowest cost, multi-tenant
DEDICATED_CPU:
- Namespace uses its own dedicated CPU infrastructure
- Requires qdrant_url, qdrant_api_key, ray_head_node_url
- Single-tenant CPU compute
- Medium cost
DEDICATED_GPU:
- Namespace uses its own dedicated GPU infrastructure
- Requires qdrant_url, qdrant_api_key, ray_head_node_url
- Requires gpu_type and gpus_per_worker configuration
- Single-tenant GPU compute
- Highest cost
Use Cases:
- Development namespace: Set compute_tier=SHARED to use organization's infrastructure
- Production namespace: Inherit organization's DEDICATED infrastructure (don't override)
- ML namespace: Override with DEDICATED_GPU and GPU configuration
- Cost optimization: Override ENTERPRISE org to SHARED for dev/test namespaces
Examples:
Inherits organization infrastructure (no override):
NamespaceInfrastructure(
qdrant_collection="ns_production",
compute_tier=ComputeTier.SHARED # Uses org or shared infrastructure
)
Override to dedicated CPU:
NamespaceInfrastructure(
qdrant_url="http://qdrant-ns-prod:6333",
qdrant_api_key="qdrant_key_ns_123",
qdrant_collection="ns_production",
ray_head_node_url="ray://ray-ns-prod:10001",
ray_dashboard_url="http://ray-ns-dashboard:8265",
compute_tier=ComputeTier.DEDICATED_CPU,
max_concurrent_jobs=50
)
Override to dedicated GPU:
NamespaceInfrastructure(
qdrant_url="http://qdrant-gpu:6333",
qdrant_api_key="qdrant_key_gpu",
qdrant_collection="ns_ml",
ray_head_node_url="ray://ray-gpu:10001",
compute_tier=ComputeTier.DEDICATED_GPU,
gpu_type="A100",
gpus_per_worker=2
)