#Exceeded the limit of 1,000 worker routes
33 messages · Page 1 of 1 (latest)
It's documented here https://developers.cloudflare.com/workers/platform/limits/#routes-and-domains
It shouldn't have let you go above it though, unless you had those 1,300 before the limit was in place (1 or 2 years ago at a guess?)
The official process to get it raised is to fill out https://forms.gle/ukpeZVLWLnKeixDu7, but there isn't a guarantee about response times and the docs say to consider using Workers for Platforms instead.
Yeah I see, it actually hit 1,000 exactly.
Thanks. I'll look into that.
Yeah i see the worker has more than 1,000 routes
but the zone does not
Interesting, the docs say it should be 1,000 per worker and separately also 1,000 per zone
Oh wait no I understood that wrong, it's 1,000 zones per worker, not 1,000 routes per worker
So a Worker can have more than 1,000 routes as long as they're on different zones, while a zone can't have more than 1,000 routes across all Workers
It's not a fun limit to run up against out of nowhere, but it is documented at least and has been for as long as I can remember the limit being a thing
Yeah thats right, it looks like can potentially do away with this though if I pay for the workers for platforms
There must be a way to do this without a cap
Workers for Platforms is the solution, you should not have over 1k routes. Even more than a hundred sounds like you're heading in a bad direction
I'm looking into that, but don't I still need to specify which customer routes hit the worker? Even if I am using wildcard subdomains, every customer needs a route, no?
customer.domain.com is CNAMEing to hosting.mydomain.com, and I'm adding a route for the customer.
but are you thinking I can make this work with just one route? the hosting route?
If you're using CF For SaaS, you just use */* https://developers.cloudflare.com/cloudflare-for-platforms/cloudflare-for-saas/start/advanced-settings/worker-as-origin/
WfP would let you deploy different workers per customer which you execute via binding, ex:
Dispatch worker */* -> uses something like hostname/etc to dynamically call specific user worker
or if it's a single worker for all, just */*
Worth mentioning, as that guide says, */* will grab everything and you need to exclude your own domain *domain.com/* if you have any other unused subdomains. I always just tell people to get a seperate domain for CF For SaaS to avoid any issues, since firewall rules/etc apply too, easy to accidentally effect custom hostnames if they use the same domain as your main website
you can just make a second worker route with Service: none
so lets say i dont want the room domain for my main site to hit it
it does seem the asterisk is working across all sites
just might want to handle exlcusions now
room.mainsite.com/* service: none
i see.. and is it not possible to do something like this? api.*/*
i have a worker for just api routes
how does the worker know what URL to send to the worker though, using the wildcard?
anything resolving to my domain?
i guess i can just move this logic into a single worker
oh anything entering the proxy is going to hit that worker
it doesn't change it, it's just whatever it receives