Load balance HTTP based on a percentage of traffic

Hi all,

I was wondering if Caddy already supports this feature:

  • load balance a percentage of all traffic (say 10%) to one of proxy backends.

The use cases are:

  • Canary deployment of a new version of a service.
  • A/B testing

Apparently it’s possible to do this in Nginx using split clients: Module ngx_http_split_clients_module

If it’s not possible at the moment, would it be feasible to implement this as a proxy policy?

Many thanks in advance!

I don’t think there’s a native way to do this (yet) but it could be implemented, sure.

One possible hacky way to do it would be to specify the 10% backend once, and the 90% backend 9 times. I mean, that’s obviously weird but it might hold you over until someone implements it! :slight_smile:


Ha, that is a nice workaround :smile:
Thank you!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.