3 ms·
These are offered more as an escape hatch in case the system doesn't do what you want automatically. But the goal is definitely for the system to do what you wa
by kentonv 3y ago
These are offered more as an escape hatch in case the system doesn't do what you want automatically. But the goal is definitely for the system to do what you want automatically, so that no one ever has to provide these hints.
I actually argued against adding these hints at all, since it confuses the messaging and most people don't need them... but they were easy to add and solved an immediate problem for a few customers, so we did.
In other cases we've held firm. For example, some people have wanted to restrict their Workers to run in specific regions because the Worker made lots of requests to a specific back-end in that region. Instead of actually offering explicit hints, we built a system to detect this automatically: https://blog.cloudflare.com/announcing-workers-smart-placement/ https://blog.cloudflare.com/announcing-workers-smart-placeme...
In any case, most people don't have to think about regions on Workers, and for the few that do, our goal is to change that.
(I'm the tech lead for Cloudflare Workers.)
- mahmoudimus 3y ago> In other cases we've held firm. For example, some people have wanted to restrict their Workers to run in specific regions because the Worker made lots of requests to a specific back-end in that region. Instead of actually offering explicit hints, we built a system to detect this automatically: https://blog.cloudflare.com/announcing-workers-smart-placeme https://blog.cloudflare.com/announcing-workers-smart-placeme... That is an excellent way to design a product. Great job.
- kkielhofner 3y agoThank you for the context and this is what I was getting at - if you really want to dig in on things like KV, D1 and DO you will see occasional mentions of regions (I'd really call it geography) to add context on things like "KV is eventually consistent, instant in the pop where the write takes place but takes X ms to propagate everywhere". For many (most?) applications it doesn't really matter, I get the sense for these you clearly document these things so people understand the more-or-less inescapable fundamental reasons why things are what they are. As other commenters have noted "there is no free lunch" when it comes to things like the physics of getting data from a pop in Tokyo to Chicago but Cloudflare does a good job and making it happen more-or-less invisible.