Any way to manually set a region for workers?

The smart placement is not reliable enough to detect where it should be placed, why isn't there a simpler option to just let the developer set the region themselves?
2 Replies
Chaika
Chaika8mo ago
I think part of it is they don't want to give you those level of controls/CF's network isn't really designed for it. You may be able to kind of hack around it by making a D1 DB in a specific region and binding your worker to it: https://developers.cloudflare.com/workers/configuration/smart-placement/#d1
Workers with a D1 binding will always be placed in a data center near the location of the D1 database they are bound to.
otherwise you could throw that into #workers-feature-suggestions, it's something we (community champs/mvps) have suggested as well, more manual & path-specific smart placement. (ps, there's #workers-help for the future as well, that's why there's no Workers tags here)
Cloudflare Docs
Smart Placement (beta) · Cloudflare Workers docs
Speed up your Worker application by automatically placing your workloads in an optimal location that minimizes latency.
Moe
MoeOP8mo ago
Def will add a feature suggestion there but yea the d1 hack sounds good actually, ty!
Want results from more Discord servers?
Add your server