基于一定比例的stream量或请求负载均衡HTTP?

我想让我的应用程序的v1在一个池中,在另一个池中的v1.1版本中,然后慢慢增加stream量,使其减less到一个池。

任何人都可以用HA Proxy,Varnish,Nginx或其他的东西来展示一些具体的例子吗?

拆分客户端模块专为此devise:

# I like starting my upstream names with _ # so they're not confused with hostnames upstream _old_upstream { server 127.0.0.1:1234; } upstream _new_upstream { server 127.0.0.1:4321; } # Make sure the values here match the names of the upstream blocks above split_clients $remote_addr $split_upstream { 10% _new_upstream; - _old_upstream; } server { location / { # EDIT: I forgot, when using variables in a proxy_pass, you have to # specify the entire request proxy_pass http://$split_upstream$request_uri; } } 

然后,当您想要将更多stream量移动到新服务器时,只需更改百分比并运行nginx -s reload