# qdrant-scale
Agent skills for scaling Qdrant vector search deployments
pip install qdrant-scale
```python
from qdrant_scale import QdrantScaler
# attach to existing cluster
scaler = QdrantScaler(
host="localhost:6333",
api_key="your-key"
)
# check if scaling needed
metrics = scaler.get_metrics()
if metrics.cpu_usage > 0.8 or metrics.memory_usage > 0.9:
scaler.scale_up(target_nodes=5)
# auto-scale based on query latency
scaler.watch(
max_latency_ms=100,
check_interval=30
)
designed for programmatic control of Qdrant clusters. works with cloud deployments and self-hosted k8s setups.
skills included:
- horizontal scaling (add/remove nodes)
- vertical scaling (change node specs)
- collection sharding operations
- replication factor adjustment
- health monitoring and auto-recovery
requires cluster mode, won't work on single-node standalone instances.
from qdrant_scale import QdrantScaler, ScalingPolicy
# define custom scaling logic
policy = ScalingPolicy(
scale_up_threshold=0.75,
scale_down_threshold=0.25,
cooldown_minutes=10,
min_nodes=2,
max_nodes=20
)
scaler = QdrantScaler("localhost:6333")
scaler.apply_policy(policy)
# reshard collection across new nodes
scaler.reshard_collection(
collection_name="embeddings",
shard_count=8,
replication_factor=2
)
# drain node before removal
scaler.drain_node("node-3")
scaler.remove_node("node-3")
# backup before scaling operations
scaler.create_snapshot("pre-scale-snapshot")
scaler.scale_up(target_nodes=10)MIT
<!-- nit -->