News for hackers. Stuff that matters.
Re:We raised a bunch of money by bfung on Wednesday June 28, 2023 @11:22AM (#36507811)
Stateless compute is relatively simple to be region-less, but even fly’s homepage has a map of regions.

When state is introduced, then CAP/PACELC distributed systems issues arise, and figuring out approaches to deal with them are a must. Read fly’s Postgres docs, and regions come right back in.

Re:We raised a bunch of money by bob1029 on Wednesday June 28, 2023 @12:31PM (#36508850)
> When state is introduced

Only the most trivial business systems can operate without any state.

If your application has any sort of shared, mutable state, you absolutely need to pick a region, or go really deep into the EC/consensus/clustering rabbit hole. With a dedicated region with 1 big DB, you can achieve latency figures (over the shared state) that would be infeasible with other schemes. Serializing transactions in a distributed manner is a circus compared to what Postgres has to do to achieve the same.

For better or worse, sticking a big SQL database in exactly one region will almost always be the best path for most forms of business. If latency/edge are still a concern at this point, that's when we maybe start talking about more specific geographies and standing up read replicas in those regions. In my experience, if you are peddling B2B webapps, no one will ever complain about east vs west coast latency unless you actually screwed something up in code.

Re:We raised a bunch of money by swyx on Wednesday June 28, 2023 @06:10PM (#36513340)
im relatively well read on databases and couldnt figure out - what is the EC in your comment? EC2?
Re:We raised a bunch of money by bob1029 on Wednesday June 28, 2023 @06:33PM (#36513573)
eventual consistency
Re:We raised a bunch of money by bfung on Thursday June 29, 2023 @02:35PM (#36524764)
Let’s hope someone doesn’t put the backup/replica in different region, the one big instance gonna be tough to restore!
Re:We raised a bunch of money by kkielhofner on Wednesday June 28, 2023 @12:33PM (#36508881)
This is Fly - a much earlier stage company and them receiving early funding is the genesis of this entire discussion.

I point to Cloudflare (what I'm most familiar with). Across their entire stack of compute, storage, db, etc product lines you won't see a hint of region anywhere. It just works, everywhere. Same with Fastly/Oracle (although they like Fly are quite a ways behind Cloudflare).

I suspect (hope) that as Fly matures their apparent true goal of edge and region-less applications will mature more. Their compromises on region awareness for DB has always struck me as a more of a resource restraint compromise on their part than end goal. As you say these challenges are hard (expensive).

Re:We raised a bunch of money by bob1029 on Wednesday June 28, 2023 @05:09PM (#36512648)
> you won't see a hint of region anywhere.

https://developers.cloudflare.com/d1/learning/data-location/

  Hint Hint description
  wnam Western North America
  enam Eastern North America
  weur Western Europe
  eeur Eastern Europe
  apac Asia-Pacific
There is no free lunch here. This is always a game of information theory and physics at the end.
Re:We raised a bunch of money by kkielhofner on Thursday June 29, 2023 @08:44AM (#36519623)
If I were at Cloudflare I'd suggest calling these "geographies" where the magic still applies (any one of those geographies has at least dozens of component POPs that are invisible).

The fact remains this is somewhat down in the docs because it is automatic and invisible to the point it works well enough where most developers don't know, don't care, and aren't exposed to it in any meaningful way. Contrast this with AWS where the first thing you are presented with is picking a region where everything lives, while not clearly and explicitly explaining that many things are ultimately dependent on us-east. Cue the shock and confusion when us-east has yet another issue and those in all other regions don't understand how and why they are impacted.

You are correct about the free lunch, information theory, and physics at the end. I don't think a reasonable person can think when you write data to a pop in Tokyo that it could possibly show up in Chicago instantly. That is fundamentally impossible and always will be. I think CF does a pretty good job making it "magic" for most devs and use cases while explaining these fundamental realities and limitations to those who need to know (potentially) for whatever their application is.

Re:We raised a bunch of money by skybrian on Wednesday June 28, 2023 @05:13PM (#36512691)
"Won't see a hint of region anywhere" is an exaggeration.

Here's the Durable Objects documentation [1]. Don't those "location hints" look like regions?

Also, here's the "Data location" page for Cloudflare D1 [2]. See "available hints" at the bottom.

I think it would be more accurate to say that Cloudflare's architecture is designed around having lots of regions, automatic migrations between them, and no guarantee about which one you'll get. But they're still there.

[1] https://developers.cloudflare.com/workers/runtime-apis/durab...

[2] https://developers.cloudflare.com/d1/learning/data-location/

Re:We raised a bunch of money by kentonv on Wednesday June 28, 2023 @05:41PM (#36513005)
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-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.)

Re:We raised a bunch of money by kkielhofner on Thursday June 29, 2023 @08:34AM (#36519536)
Thank 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.
Re:We raised a bunch of money by mahmoudimus on Tuesday July 04, 2023 @11:42AM (#36588164)
> 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...

That is an excellent way to design a product. Great job.