#Exceeded the limit of 1,000 worker routes

33 messages · Page 1 of 1 (latest)

brazen cape
#

Anyone know why I would suddenly get this error when there are over 1,300 routes already on the worker?

#

This is not documented anywhere, and my app is currently broken to new users.

proper flint
brazen cape
#

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

proper flint
#

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

brazen cape
#

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

iron mango
#

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

brazen cape
#

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?

#

but are you thinking I can make this work with just one route? the hosting route?

scenic bone
#

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

brazen cape
#

ah

#

where do you exclude?

scenic bone
#

you can just make a second worker route with Service: none

brazen cape
#

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

scenic bone
brazen cape
#

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

scenic bone