Load balancing for percentage rollout with two hosting providers
I have two versions of a website: the old and the new. The new is powered by Cloudflare Pages, while the old is using some other hosting provider, which I would like to switch away from. The domain name is managed by Cloudflare. Is there a way to have the traffic split between the two versions so that the proportions are controlled manually (to be able to gradually increase) and user sessions are maintained (so that the same user always comes to the same version)? Would creating a load balancer with session affinity be the right tool for the job? If so, how should the endpoint be configured?
1 Reply
Do you have any tutorials or examples you would recommend?
Would it be entirely inappropriate to do it with a load balancer? Looked at the example, and it feels like it would add a lot of complexity. One would have to implement a reverse proxy, patching up the content where needed.
Downtime is a concern. The point was to have something simple and robust, not to make it more error-prone.
I was imagining something like having three domains—one is where the worker would sit, and two for the two versions—and then the worker would have to patch some links in responses.
Feels like it should be easier if two hosting providers were configured for the same domain name, and you switched between two IP addresses.