Resource Management
This guide covers resource group management and node/replica operations.
Resource Groups
Section titled “Resource Groups”Resource groups allow you to organize and manage compute resources.
Create Resource Group
Section titled “Create Resource Group”Create a new resource group:
await client.createResourceGroup({ resource_group: 'rg1', config: { requests: { node_num: 2, }, limits: { node_num: 4, }, },});List Resource Groups
Section titled “List Resource Groups”List all resource groups:
const groups = await client.listResourceGroups();
console.log('Resource groups:', groups.resource_groups);Describe Resource Group
Section titled “Describe Resource Group”Get detailed information about a resource group:
const info = await client.describeResourceGroup({ resource_group: 'rg1',});
console.log('Resource group info:', info);Update Resource Group
Section titled “Update Resource Group”Update resource group configuration:
await client.updateResourceGroup({ resource_group: 'rg1', config: { requests: { node_num: 3, }, limits: { node_num: 6, }, },});Drop Resource Groups
Section titled “Drop Resource Groups”Delete resource groups:
await client.dropResourceGroups({ resource_groups: ['rg1', 'rg2'],});Node Management
Section titled “Node Management”Transfer Node
Section titled “Transfer Node”Move a node to a different resource group:
await client.transferNode({ source_resource_group: 'rg1', target_resource_group: 'rg2', num_node: 1,});Replica Management
Section titled “Replica Management”Transfer Replica
Section titled “Transfer Replica”Move replicas to a different resource group:
await client.transferReplica({ source_resource_group: 'rg1', target_resource_group: 'rg2', collection_name: 'my_collection', num_replica: 1,});Resource Group Configuration
Section titled “Resource Group Configuration”Configuration Structure
Section titled “Configuration Structure”{ requests: { node_num: 2, // Requested number of nodes }, limits: { node_num: 4, // Maximum number of nodes },}Transfer Policies and Node Filters
Section titled “Transfer Policies and Node Filters”Resource group configuration can also define where to borrow missing nodes from, where to send redundant nodes, and which node labels are allowed in the group.
await client.updateResourceGroup({ resource_groups: { rg1: { requests: { node_num: 2 }, limits: { node_num: 4 }, transfer_from: [{ resource_group: '__default_resource_group' }], transfer_to: [{ resource_group: 'rg_overflow' }], node_filter: { node_labels: [{ key: 'workload', value: 'search' }], }, }, },});When describing a resource group, the response includes node and movement details when Milvus returns them:
const info = await client.describeResourceGroup({ resource_group: 'rg1',});
console.log('Available nodes:', info.resource_group.num_available_node);console.log('Incoming nodes:', info.resource_group.num_incoming_node);console.log('Outgoing nodes:', info.resource_group.num_outgoing_node);console.log('Nodes:', info.resource_group.nodes);Best Practices
Section titled “Best Practices”- Organize by workload: Create resource groups for different workloads
- Set appropriate limits: Configure limits based on available resources
- Monitor usage: Regularly check resource group usage
- Balance resources: Use transfer operations to balance load
Next Steps
Section titled “Next Steps”- Learn about Collection Management
- Explore Best Practices