Make a worker request that hits a specific data center for improved KV hits


Looking at the KV documentation, a glaring issue for me (in certain contexts) is the fact that it can take up to 60 seconds for KV writes to be seen across all Cloudflare infrastructure.

I would like to create an internal “admin” worker for shooting off various tasks, but I need the cache to be written and readable almost instantly. So in this case, I would like to ensure requests to this worker always are resolved in the same edge location.

Is this possible? Perhaps by setting a certain header in the fetch request to a worker?

This worker would only be called internally from other user-facing workers- to kick off various long-running tasks for data that needs to be collected and cleaned. I would like to maintain the state of these tasks in KV, and insure that multiple such tasks are not started due to a KV miss.

The other option I suppose is to create an “Admin Tasks” Durable Object? As they seem to guarantee that their data is always up-to-date, so we should avoid the stale data issue.

I would suggest you to do so.