正在加载视频...

视频加载失败

I am once again begging you to put your database servers and application servers in the same region.

1,422,580 次观看 • 1 年前 •via X (Twitter)

61 条评论

E 的头像
E1 年前

I can do it even better:

Ben Dicken 的头像
Ben Dicken1 年前

Incredible.

Jorge Trujillo 的头像
Jorge Trujillo1 年前

whoever did the us-east-1 ↔ ap-east-1 combo must already have the open to work picture

Ben Dicken 的头像
Ben Dicken1 年前

😂

Dimitris GR 900 Liverpol Fan Account 的头像
Dimitris GR 900 Liverpol Fan Account1 年前

People put them in different regions? For reals?

Ben Dicken 的头像
Ben Dicken1 年前

@Dimitris_Efsta Sometimes, yes.

Ronan Berder (SF + SG) 的头像
Ronan Berder (SF + SG)1 年前

Better yet: use SQLite and have the DB on the same server.

Ben Dicken 的头像
Ben Dicken1 年前

What happens when your one server goes down or has a failing disk?

Ronan Berder (SF + SG) 的头像
Ronan Berder (SF + SG)1 年前

Litestream + R2 or S3

Ben Dicken 的头像
Ben Dicken1 年前

That's cool. My two big questions are: (1) How can to commit writes with acceptable latency? (2) If a node goes down, how fast is a restore? Is one having to take downtime?

Ronan Berder (SF + SG) 的头像
Ronan Berder (SF + SG)1 年前

> How can to commit writes with acceptable latency? I use Litestream for backups. If you really want a more complex setup, Turso or D1 is your friend. > If a node goes down, how fast is a restore? Is one having to take downtime? It's a file, pretty fast. Faster than getting a new node set up and the code running. I wasn't taking a dig on Planetscale BTW, I only just realized you work there.

Ben Dicken 的头像
Ben Dicken1 年前

No need to apologize! I want to learn more about cool tech.

Ronan Berder (SF + SG) 的头像
Ronan Berder (SF + SG)1 年前

In that case, I'd check Limbo from the Turso folks: Sounds like a pretty cool attempt to rewrite SQLite.

Radic Davydov 的头像
Radic Davydov1 年前

They should be in the same data center with < 1ms latency.

Ben Dicken 的头像
Ben Dicken1 年前

Radic gets it.

nle 的头像
nle1 年前

Is there any reason to put them in different regions though? Naturally people just start out on a single region for a long time until they need to scale up multi regions, in that case they still keep db separated in each region

Ben Dicken 的头像
Ben Dicken1 年前

@oscarle_x There are cases where multi-region databases are needed for ultra-high durability cases, like financial transactions. I would not recommend having a multi-master setup though. Have one region replicate from the other.

Ben Hollis 的头像
Ben Hollis1 年前

What kind of criminal would NOT have their DB in the same region as the app servers!?

Oosta Soroosh 的头像
Oosta Soroosh1 年前

what's the difference between the first and the second one?

Ben Dicken 的头像
Ben Dicken1 年前

Intra-AZ vs inter-AZ. For further reading check this out:

Patrick Kuhnke 的头像
Patrick Kuhnke1 年前

What about not using a database at all?

Ben Dicken 的头像
Ben Dicken1 年前

@ku_ds17868 Interesting. Say more.

Patrick Kuhnke 的头像
Patrick Kuhnke1 年前

So the state of your application is stored in memory on the server and serialized to disk. You still need to make sure that the server is nearby though.

Jonathan 的头像
Jonathan1 年前

People don’t do this????

Ben Dicken 的头像
Ben Dicken1 年前

Some don't!

Jonathan 的头像
Jonathan1 年前

Diabolical behavior

Jamie Turner 的头像
Jamie Turner1 年前

Are there people who don't do that?

Ben Dicken 的头像
Ben Dicken1 年前

This tweet is to ensure we eliminate the few that do 🫡

Holly Guevara 的头像
Holly Guevara1 年前

He can't keep getting away with this

Ernesto Diaz 的头像
Ernesto Diaz1 年前

Care to explain this one?

Ben Dicken 的头像
Ben Dicken1 年前

Check out

𝒫𝑒𝓇 𝒜𝓇𝓃𝑒𝓃𝑔 【🐧λ🦀⎈】 的头像
𝒫𝑒𝓇 𝒜𝓇𝓃𝑒𝓃𝑔 【🐧λ🦀⎈】1 年前

Same availability zone even.

Ben Dicken 的头像
Ben Dicken1 年前

Absolutely! We shouldn't rely on same-AZ since we generally need to replicate across multiple AZs for high-availability, but this is certainly optimal.

Tyler F. Cloutier 的头像
Tyler F. Cloutier1 年前

I am once again asking you to put your database servers and application servers in the same process. @spacetimedb

PRIZ ;] 的头像
PRIZ ;]1 年前

I am once again begging you to STOP USING SPEED BALLS

Marc Steele 的头像
Marc Steele1 年前

Load balancers in Australia, app servers in the US and database in Europe. Think I’ve got it. Thanks for the tip!

Ben Dicken 的头像
Ben Dicken1 年前

@steelegbr 😅

Jamie Voynow 的头像
Jamie Voynow1 年前

@levelsio wait but I thought python was the bottleneck not the database ? 🤣

AJ Stuyvenberg 的头像
AJ Stuyvenberg1 年前

You and these balls man, you can't keep getting away with this

NightinWolf 的头像
NightinWolf1 年前

anything below 100ms is a decent result. misleading video.

Ben Dicken 的头像
Ben Dicken1 年前

For a full website page load, sure. For for a single round-trip from application to database, 100ms is far too long.

NightinWolf 的头像
NightinWolf1 年前

you have extreme expectations which i admire as I see you are involved with planetscale. big ups for that. but no website gets such result. i clicked on your reply and according to firefox, it took 735ms. so by ur standards, twitter is taking way way toooo long.

Ben Dicken 的头像
Ben Dicken1 年前

Sure, but loading page on X easily requires 10, 20, or even 50+ queries for a single web page load. Every millisecond we can shave off each query adds up.

etkaute 的头像
etkaute1 年前

This graphic scratches an itch in my brain

Jackson 的头像
Jackson1 年前

cool visual, but pretty sure nobody is doing this

Ben Dicken 的头像
Ben Dicken1 年前

Unfortunately it does happen.

Agustin Falaz 的头像
Agustin Falaz1 年前

us-east-1 talking to ap-east-1 is a vibecoded TODO app or admin panel

kortress 的头像
kortress1 年前

As far as I know, if they are in different regions, extra fee exists.

Ben Dicken 的头像
Ben Dicken1 年前

Yeah, this is true even of cross-AZ traffic. My understanding is that AWS charges bandwidth fees for traffic that's not within the same AZ.

Jeferson 的头像
Jeferson1 年前

Edge computing can be a good strategy.

Ben Dicken 的头像
Ben Dicken1 年前

Edge is great for caching resources and such. You have to be careful about connecting to a centralized database from far-away edge nodes though.

Rajiv Khaneja 的头像
Rajiv Khaneja1 年前

For certain workloads put your database and application on the same server. I've seen 10x increase in requests/sec

network_pun 的头像
network_pun1 年前

why do we need to keep inventing pretty pictures to say "latency exists"?

lala 的头像
lala1 年前

Nice visual

Devaansh Bhandari 的头像
Devaansh Bhandari1 年前

I'm not very experienced with infrastructure, but don't companies keep servers in different locations to reduce latency and for failover backup? For example, if the US server goes down, can it connect to the CA one? How is failover usually handled?

Alex Havryleshko 的头像
Alex Havryleshko1 年前

It started concerning me recently actually. I didn’t understand latency. With each query, the request travels across the network. Good rule of thumb in system design: configure it for the same region, and ideally same availability zone.

Josh Stein 的头像
Josh Stein1 年前

where can I slide it all the way?

Scott | 1A x 2A 🇺🇲 的头像
Scott | 1A x 2A 🇺🇲1 年前

Does Planetscale have a presence in each of these AWS datacenters? How does the cost compare to RDS?

Ben Dicken 的头像
Ben Dicken1 年前

We've got this info on our pricing page:

Chase Miller 的头像
Chase Miller1 年前

The cost savings is huge too.

Jake Casto 的头像
Jake Casto1 年前

Explain Neon using balls

相关视频