Skip to content

Comment on Globally Distributed Postgresparent

Comments

So far, yes they're ok with that. We can also optimize most of that number away, down to <10ms for almost every app.

They're ok with it because a (valuable) write request that's 10% slower typically comes after a read request that's much, much faster. In this scenario:

my replay time to their region in Sydney Australia is between 25 and 45ms. That's pretty quick!

The first read only requests were probably <100ms for simonw. The replayed request (that he initiated with a click) was probably 500ms. When a request already takes 500ms, an additional 50ms of latency is basically noise.

The alternative is (often) for them to refactor their apps and then enforce write restrictions on code to make sure random GETs don't write to the DB unnecessarily.

Our goal was to make this work without requiring hairy code changes. People who are ready to do the work to optimize their apps can make things faster and use what we're doing now as a fallback, if they want.

When a request already takes 500ms, an additional 50ms of latency is basically noise.

I guess it really just depends on what you're trying to do. I would never consider 50ms as noise. It's an accumulation of various things taking 50ms that results in your request taking 500ms in the first place, which is very slow.

I'm interested in this though. I think it's a cool experiment!

Oh yes, that is a fair point. I'm specifically talking about the type of requests that always take 500ms. Almost every HTTP request from Australia to the US takes ~500ms.

This is meant to decrease the unfixable latency, it's probably not a good way to solve app level latency issues.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.