milvus/internal/proxy
wei liu 3b10085f61
enhance: Optimize workload based replica selection policy (#36181)
issue: #35859

This PR introduce two new param: toleranceFactor and checkRequestNum,
after every checkRequestNum request has been assigned, try to compute
querynode's workload score.

if the diff is less than the toleranceFactor, replica selection policy
will fallback to round_robin, which reduce the average cost to about
500ns.

if the diff is larger than the toleranceFactor, replica selection policy
will compute querynode's score to select the target node with smallest
score in every assigment.

---------

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2024-09-20 12:33:11 +08:00
..
accesslog enhance: Forbid access log print error message with line break (#34491) 2024-08-20 17:36:55 +08:00
connection enhance: timer instead of ticker (#36133) 2024-09-10 15:23:06 +08:00
authentication_interceptor_test.go fix: Unify hook singleton implementation in proxy (#34887) 2024-07-26 18:07:53 +08:00
authentication_interceptor.go enhance: make the auth error message more suitable (#32253) 2024-04-16 16:47:19 +08:00
cgo_util_test.go enhance: remove CheckVecIndexWithDataTypeExist function in pkg and remove some cgo call (#34102) 2024-06-26 21:13:44 +08:00
cgo_util.go enhance: optimize milvus core building (#35610) 2024-08-23 12:35:02 +08:00
channels_mgr_test.go enhance: make sure stream closed (#29456) 2023-12-26 19:56:47 +08:00
channels_mgr.go feat: add more operation detail info for better allocation (#30438) 2024-03-28 06:33:11 +08:00
channels_time_ticker_test.go Format the code (#27275) 2023-09-21 09:45:27 +08:00
channels_time_ticker.go Format the code (#27275) 2023-09-21 09:45:27 +08:00
condition_test.go Format the code (#27275) 2023-09-21 09:45:27 +08:00
condition.go Propagate task ctx done err for proxy (#27892) 2023-10-26 19:06:13 +08:00
count_reducer_test.go Format the code (#27275) 2023-09-21 09:45:27 +08:00
count_reducer.go feat: add more operation detail info for better allocation (#30438) 2024-03-28 06:33:11 +08:00
data_coord_mock_test.go enhance: Remove import v1 (#31403) 2024-03-22 15:29:09 +08:00
database_interceptor_test.go enhance: Update protobuf-go to protobuf-go v2 (#34394) 2024-07-29 11:31:51 +08:00
database_interceptor.go fix: add more requests to the database interceptor (#30452) 2024-02-02 16:49:06 +08:00
default_limit_reducer.go Improve the error message for getting all indexes of collection (#27389) 2023-10-08 21:23:32 +08:00
dummyreq_test.go Format the code (#27275) 2023-09-21 09:45:27 +08:00
dummyreq.go
hook_interceptor_test.go fix: Unify hook singleton implementation in proxy (#34887) 2024-07-26 18:07:53 +08:00
hook_interceptor.go enhance: remove the invalid log (#35465) 2024-08-14 18:00:53 +08:00
impl_test.go enhance: use the msg position obj when getting replicate channel position (#35606) 2024-08-27 10:28:59 +08:00
impl.go enhance: improve log encoding performance on proxy nodes (#36123) 2024-09-11 14:51:07 +08:00
interface_def.go Decoupling client and server API in types interface (#27186) 2023-09-26 09:57:25 +08:00
lb_balancer.go add metrics for replica selection (#25037) 2023-06-27 09:52:44 +08:00
lb_policy_test.go enhance: Enable dynamic update replica selection policy (#35860) 2024-09-13 17:05:15 +08:00
lb_policy.go enhance: Enable dynamic update replica selection policy (#35860) 2024-09-13 17:05:15 +08:00
look_aside_balancer_test.go enhance: Optimize workload based replica selection policy (#36181) 2024-09-20 12:33:11 +08:00
look_aside_balancer.go enhance: Optimize workload based replica selection policy (#36181) 2024-09-20 12:33:11 +08:00
management_test.go enhance: add restful api to trigger component stop (#32076) 2024-06-07 10:35:54 +08:00
management.go enhance: Mark query node as read only after suspend (#35492) 2024-08-20 14:02:54 +08:00
meta_cache_adapter_test.go enhance: Avoid initializing casbin enforcer for each request (#29117) 2023-12-12 10:36:43 +08:00
meta_cache_adapter.go fix: the panic when db isn't existed in the rate limit interceptor (#33244) 2024-05-22 15:57:39 +08:00
meta_cache_test.go feat: Support create collection with functions (#35973) 2024-09-12 10:43:06 +08:00
meta_cache.go enhance: Enable dynamic update replica selection policy (#35860) 2024-09-13 17:05:15 +08:00
metrics_info_test.go Refine state check (#27541) 2023-10-11 21:01:35 +08:00
metrics_info.go enhance: remove cooling off in rate limiter for read requests (#35935) 2024-09-04 14:39:10 +08:00
mock_cache.go fix: memory leak in proxy meta cache (#36075) 2024-09-08 17:33:05 +08:00
mock_channels_manager.go support complex delete expression (#25752) 2023-09-12 10:19:17 +08:00
mock_lb_balancer.go Organize all mockery generation commands in Makefile (#26826) 2023-09-04 21:19:48 +08:00
mock_lb_policy.go Organize all mockery generation commands in Makefile (#26826) 2023-09-04 21:19:48 +08:00
mock_msgstream_test.go Support to replicate the mq message (#27240) 2023-10-20 14:26:09 +08:00
mock_shardclient_manager.go Decoupling client and server API in types interface (#27186) 2023-09-26 09:57:25 +08:00
mock_test.go feat: record the duration waiting in the proxy queue (#34744) 2024-07-23 14:23:52 +08:00
mock_tso_test.go Decoupling client and server API in types interface (#27186) 2023-09-26 09:57:25 +08:00
msg_pack_test.go feat: Support field partial load collection (#35416) 2024-08-20 16:49:02 +08:00
msg_pack.go enhance: Enable linux code checker (#35084) 2024-07-30 15:53:51 +08:00
OWNERS
privilege_cache_test.go enhance: Add in-memory cache for casbin enforcer result (#35271) 2024-08-05 18:48:15 +08:00
privilege_cache.go fix: Re-read value after once initialization (#35642) 2024-08-22 17:24:58 +08:00
privilege_interceptor_test.go fix: fix ReadWrite privilege group deny all global API (#36144) 2024-09-13 10:33:08 +08:00
privilege_interceptor.go fix: fix ReadWrite privilege group deny all global API (#36144) 2024-09-13 10:33:08 +08:00
proxy_rpc_test.go Refine Proxy errors (#27499) 2023-10-09 10:09:33 +08:00
proxy_test.go enhance: provide more general configuration to control mmap behavior (#35359) 2024-08-21 00:22:54 +08:00
proxy.go enhance: remove cooling off in rate limiter for read requests (#35935) 2024-09-04 14:39:10 +08:00
rate_limit_interceptor_test.go enhance: support httpv1/v2 throttle and add it for httpV2(#35350) (#35470) 2024-08-20 16:16:55 +08:00
rate_limit_interceptor.go enhance: support httpv1/v2 throttle and add it for httpV2(#35350) (#35470) 2024-08-20 16:16:55 +08:00
reducer_test.go Format the code (#27275) 2023-09-21 09:45:27 +08:00
reducer.go Fill output fields for count request (#27967) 2023-10-30 10:00:12 +08:00
repack_func_test.go Format the code (#27275) 2023-09-21 09:45:27 +08:00
repack_func.go Support to replicate the mq message (#27240) 2023-10-20 14:26:09 +08:00
replicate_stream_manager_test.go fix: Fix the unstable unit test TestReplicateManager (#28718) 2023-11-24 17:50:30 +08:00
replicate_stream_manager.go Support to replicate the mq message (#27240) 2023-10-20 14:26:09 +08:00
reScorer_test.go enhance:Refactor hybrid search (#32020) 2024-04-09 14:21:18 +08:00
reScorer.go enhance:Refactor hybrid search (#32020) 2024-04-09 14:21:18 +08:00
rootcoord_mock_test.go enhance: Add BackupRBAC/RestoreRBAC API to enable rbac backup (#35444) 2024-08-16 10:10:53 +08:00
roundrobin_balancer_test.go enhance: Enable dynamic update replica selection policy (#35860) 2024-09-13 17:05:15 +08:00
roundrobin_balancer.go enhance: Enable dynamic update replica selection policy (#35860) 2024-09-13 17:05:15 +08:00
rpc_msg.go Add slow log for read (#23272) 2023-04-14 15:30:29 +08:00
search_reduce_util_test.go enhance: simplify reduction on single search result (#36334) 2024-09-20 11:59:10 +08:00
search_reduce_util.go enhance: simplify reduction on single search result (#36334) 2024-09-20 11:59:10 +08:00
search_util.go fix: keep inner topK to avoid exceeding efSearch (#36284) 2024-09-16 11:01:25 +08:00
segment_test.go fix: wrong context passing into NewClient, error handling lost in session_util (#30817) 2024-02-28 10:40:09 +08:00
segment.go enhance:change some logs (#29579) 2024-01-05 16:12:48 +08:00
shard_client_test.go Decoupling client and server API in types interface (#27186) 2023-09-26 09:57:25 +08:00
shard_client.go enhance: Support proxy/delegator qn client pooling (#35194) 2024-08-02 11:24:19 +08:00
simple_rate_limiter_test.go enhance: enable flush rate limiter of collection level (#33837) 2024-06-24 10:52:03 +08:00
simple_rate_limiter.go fix: Fix DB limiter nodes are mistakenly cleaned up (#35991) 2024-09-05 17:35:04 +08:00
task_alias_test.go fix: execute method should return an error when result is a failure (#34813) 2024-07-20 23:13:40 +08:00
task_alias.go enhance: Enable linux code checker (#35084) 2024-07-30 15:53:51 +08:00
task_database_test.go enhance: expose DescribeDatabase api in proxy (#32732) 2024-05-09 22:51:30 +08:00
task_database.go feat: add the rbac msg and send them to the replicate channel (#35392) 2024-08-15 12:06:52 +08:00
task_delete_streaming.go enhance: using streaming service in insert/upsert/flush/delete/querynode (#35406) 2024-08-29 10:03:08 +08:00
task_delete_test.go enhance: Check by proxy rate limiter when delete get data by query. (#30891) 2024-05-23 20:03:40 +08:00
task_delete.go enhance: using streaming service in insert/upsert/flush/delete/querynode (#35406) 2024-08-29 10:03:08 +08:00
task_flush_streaming.go enhance: using streaming service in insert/upsert/flush/delete/querynode (#35406) 2024-08-29 10:03:08 +08:00
task_flush.go enhance: using streaming service in insert/upsert/flush/delete/querynode (#35406) 2024-08-29 10:03:08 +08:00
task_index_test.go enhance: rename some params and reduce default bitmapCardinalityLimit… (#36138) 2024-09-12 12:09:08 +08:00
task_index.go enhance: rename some params and reduce default bitmapCardinalityLimit… (#36138) 2024-09-12 12:09:08 +08:00
task_insert_streaming.go enhance: using streaming service in insert/upsert/flush/delete/querynode (#35406) 2024-08-29 10:03:08 +08:00
task_insert_test.go enhance: Enable linux code checker (#35084) 2024-07-30 15:53:51 +08:00
task_insert.go enhance: Remove duplicated schema helper creation in proxy (#35489) 2024-08-15 19:18:53 +08:00
task_policies_test.go Decoupling client and server API in types interface (#27186) 2023-09-26 09:57:25 +08:00
task_policies.go Decoupling client and server API in types interface (#27186) 2023-09-26 09:57:25 +08:00
task_query_test.go enhance: simplify reduction on single search result (#36334) 2024-09-20 11:59:10 +08:00
task_query.go enhance: simplify reduction on single search result (#36334) 2024-09-20 11:59:10 +08:00
task_scheduler_test.go enhance: Enable linux code checker (#35084) 2024-07-30 15:53:51 +08:00
task_scheduler.go feat: record the duration waiting in the proxy queue (#34744) 2024-07-23 14:23:52 +08:00
task_search_test.go fix: keep inner topK to avoid exceeding efSearch (#36284) 2024-09-16 11:01:25 +08:00
task_search.go fix: Fix improper use of offset in HybridSearch (#36244) 2024-09-13 22:05:15 +08:00
task_statistic_test.go feat: Support field partial load collection (#35416) 2024-08-20 16:49:02 +08:00
task_statistic.go enhance: Update protobuf-go to protobuf-go v2 (#34394) 2024-07-29 11:31:51 +08:00
task_test.go fix: to add check in partition key field when set nullable==true (#36218) 2024-09-14 10:53:08 +08:00
task_upsert_streaming.go enhance: using streaming service in insert/upsert/flush/delete/querynode (#35406) 2024-08-29 10:03:08 +08:00
task_upsert_test.go enhance: Enable linux code checker (#35084) 2024-07-30 15:53:51 +08:00
task_upsert.go enhance: Remove duplicated schema helper creation in proxy (#35489) 2024-08-15 19:18:53 +08:00
task.go enhance: Ignore index check for non-loaded vector field (#36170) 2024-09-14 11:01:08 +08:00
timestamp_test.go Format the code (#27275) 2023-09-21 09:45:27 +08:00
timestamp.go enhance:Remove msgbase unnecessary assignments (#28511) 2023-11-24 15:02:39 +08:00
trace_log_interceptor_test.go enhance: Support to trace restful request and request error (#28685) 2023-11-27 20:14:26 +08:00
trace_log_interceptor.go enhance: refine access log to support format access log by yaml and print name info. (#28319) 2023-11-28 15:32:31 +08:00
type_def.go [skip e2e] Add comment for pChan (#14098) 2021-12-23 21:44:12 +08:00
util_test.go enhance: Disallow the keywords as a field name or dynamic field name (#36101) 2024-09-15 15:19:14 +08:00
util.go enhance: Disallow the keywords as a field name or dynamic field name (#36101) 2024-09-15 15:19:14 +08:00
validate_util_test.go fix: to fill default value when nullable and default value are both enable (#36030) 2024-09-19 17:35:11 +08:00
validate_util.go fix: to fill default value when nullable and default value are both enable (#36030) 2024-09-19 17:35:11 +08:00