Load balancing between Cloudflare Workers

It seems that Cloudflare does not support its load balancer pointing to a Cloudflare worker. We would like to distribute traffic between 2 CF worker scripts. It is solvable by writing a 3rd worker script that forwards the traffic, but I think it should be possible with the Cloudflare load balancing feature.

What happens when pointing the Load balancer to a Cloudflare worker address: Error 1000
DNS points to prohibited IP - You’ve requested a page on a website that is on the Cloudflare network. Unfortunately, it is resolving to an IP address that is creating a conflict within Cloudflare’s system.

Possibly a feature to consider?

I’m just curious why you need to load balance between two Workers scripts?

Cloudflare Workers should scale automatically with large number of requests.

2 Likes

AB testing purposes. There’s two workers running similar code, but require split traffic. I understand it a solution would be to migrate all the AB testing logic into one worker, but I’m just asking the question since it would help a lot even though having traffic distributed between two or more workers is not the cleanest way to approach this.

That’s what I’m thinking.

I don’t think Cloudflare is going to implement this, mainly because the scalability of the infrastructure doesn’t really need “load balancing”.

1 Like

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