mirror of
https://github.com/sogou/workflow.git
synced 2026-02-08 01:33:17 +08:00
optimize consistent_hash with map
This commit is contained in:
@@ -73,7 +73,7 @@ void register_upstream_hosts()
|
||||
},
|
||||
true,
|
||||
[](const char *path, const char *query, const char *fragment) -> unsigned int {
|
||||
return 1; // according to consistent_hash this will hit server[0]
|
||||
return 511702306; // according to consistent_hash this will hit server[0]
|
||||
});
|
||||
UpstreamManager::upstream_add_server("manual", "127.0.0.1:8001");
|
||||
UpstreamManager::upstream_add_server("manual", "127.0.0.1:8002");
|
||||
|
||||
Reference in New Issue
Block a user