Skip to content

Commit

Permalink
enhance: Enable prefer node lables in resource group (milvus-io#328)
Browse files Browse the repository at this point in the history
* enhance: Enable prefer node lables in resource group

add prefer node labels in resource groups, so resource group will prefer
to accept some node with given label.

Signed-off-by: Wei Liu <[email protected]>

* support node label format with key value pair

Signed-off-by: Wei Liu <[email protected]>

* refine node label filter name

Signed-off-by: Wei Liu <[email protected]>

---------

Signed-off-by: Wei Liu <[email protected]>
  • Loading branch information
weiliu1031 committed Nov 11, 2024
1 parent 549e469 commit cbe1707
Show file tree
Hide file tree
Showing 2 changed files with 141 additions and 51 deletions.
185 changes: 134 additions & 51 deletions go-api/rgpb/rg.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions proto/rg.proto
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ option java_generate_equals_and_hash = true;

option csharp_namespace = "Milvus.Client.Grpc";

import "common.proto";

message ResourceGroupLimit {
int32 node_num = 1;
// preserve for other limit.
Expand All @@ -19,10 +21,15 @@ message ResourceGroupTransfer {
string resource_group = 1; // resource groups can be transfered with current resource group.
// preserve for other option, such as weight, priority or affinity setup.
}

message ResourceGroupNodeFilter {
repeated common.KeyValuePair node_labels = 1; // node in resource group must match node labels requirements
}

message ResourceGroupConfig {
ResourceGroupLimit requests = 1; // requests node num in resource group, if node num is less than requests.nodeNum, it will be transfer from other resource group.
ResourceGroupLimit limits = 2; // limited node num in resource group, if node num is more than limits.nodeNum, it will be transfer to other resource group.
repeated ResourceGroupTransfer transfer_from = 3; // missing node should be transfer from given resource group at high priority in repeated list.
repeated ResourceGroupTransfer transfer_to = 4; // redundant node should be transfer to given resource group at high priority in repeated list.
ResourceGroupNodeFilter node_filter = 5; // node in resource group must match node filters
}

0 comments on commit cbe1707

Please sign in to comment.