Video wird geladen...

Video konnte nicht geladen werden

Zur Startseite

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

1,422,580 Aufrufe • vor 1 Jahr •via X (Twitter)

61 Kommentare

Profilbild von E
Evor 1 Jahr

I can do it even better:

Profilbild von Ben Dicken
Ben Dickenvor 1 Jahr

Incredible.

Profilbild von Jorge Trujillo
Jorge Trujillovor 1 Jahr

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

Profilbild von Ben Dicken
Ben Dickenvor 1 Jahr

😂

Profilbild von Dimitris GR 900 Liverpol Fan Account
Dimitris GR 900 Liverpol Fan Accountvor 1 Jahr

People put them in different regions? For reals?

Profilbild von Ben Dicken
Ben Dickenvor 1 Jahr

@Dimitris_Efsta Sometimes, yes.

Profilbild von Ronan Berder (SF + SG)
Ronan Berder (SF + SG)vor 1 Jahr

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

Profilbild von Ben Dicken
Ben Dickenvor 1 Jahr

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

Profilbild von Ronan Berder (SF + SG)
Ronan Berder (SF + SG)vor 1 Jahr

Litestream + R2 or S3

Profilbild von Ben Dicken
Ben Dickenvor 1 Jahr

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?

Profilbild von Ronan Berder (SF + SG)
Ronan Berder (SF + SG)vor 1 Jahr

> 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.

Profilbild von Ben Dicken
Ben Dickenvor 1 Jahr

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

Profilbild von Ronan Berder (SF + SG)
Ronan Berder (SF + SG)vor 1 Jahr

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

Profilbild von Radic Davydov
Radic Davydovvor 1 Jahr

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

Profilbild von Ben Dicken
Ben Dickenvor 1 Jahr

Radic gets it.

Profilbild von nle
nlevor 1 Jahr

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

Profilbild von Ben Dicken
Ben Dickenvor 1 Jahr

@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.

Profilbild von Ben Hollis
Ben Hollisvor 1 Jahr

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

Profilbild von Oosta Soroosh
Oosta Sorooshvor 1 Jahr

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

Profilbild von Ben Dicken
Ben Dickenvor 1 Jahr

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

Profilbild von Patrick Kuhnke
Patrick Kuhnkevor 1 Jahr

What about not using a database at all?

Profilbild von Ben Dicken
Ben Dickenvor 1 Jahr

@ku_ds17868 Interesting. Say more.

Profilbild von Patrick Kuhnke
Patrick Kuhnkevor 1 Jahr

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.

Profilbild von Jonathan
Jonathanvor 1 Jahr

People don’t do this????

Profilbild von Ben Dicken
Ben Dickenvor 1 Jahr

Some don't!

Profilbild von Jonathan
Jonathanvor 1 Jahr

Diabolical behavior

Profilbild von Jamie Turner
Jamie Turnervor 1 Jahr

Are there people who don't do that?

Profilbild von Ben Dicken
Ben Dickenvor 1 Jahr

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

Profilbild von Holly Guevara
Holly Guevaravor 1 Jahr

He can't keep getting away with this

Profilbild von Ernesto Diaz
Ernesto Diazvor 1 Jahr

Care to explain this one?

Profilbild von Ben Dicken
Ben Dickenvor 1 Jahr

Check out

Profilbild von 𝒫𝑒𝓇 𝒜𝓇𝓃𝑒𝓃𝑔 【🐧λ🦀⎈】
𝒫𝑒𝓇 𝒜𝓇𝓃𝑒𝓃𝑔 【🐧λ🦀⎈】vor 1 Jahr

Same availability zone even.

Profilbild von Ben Dicken
Ben Dickenvor 1 Jahr

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.

Profilbild von Tyler F. Cloutier
Tyler F. Cloutiervor 1 Jahr

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

Profilbild von PRIZ ;]
PRIZ ;]vor 1 Jahr

I am once again begging you to STOP USING SPEED BALLS

Profilbild von Marc Steele
Marc Steelevor 1 Jahr

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

Profilbild von Ben Dicken
Ben Dickenvor 1 Jahr

@steelegbr 😅

Profilbild von Jamie Voynow
Jamie Voynowvor 1 Jahr

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

Profilbild von AJ Stuyvenberg
AJ Stuyvenbergvor 1 Jahr

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

Profilbild von NightinWolf
NightinWolfvor 1 Jahr

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

Profilbild von Ben Dicken
Ben Dickenvor 1 Jahr

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

Profilbild von NightinWolf
NightinWolfvor 1 Jahr

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.

Profilbild von Ben Dicken
Ben Dickenvor 1 Jahr

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.

Profilbild von etkaute
etkautevor 1 Jahr

This graphic scratches an itch in my brain

Profilbild von Jackson
Jacksonvor 1 Jahr

cool visual, but pretty sure nobody is doing this

Profilbild von Ben Dicken
Ben Dickenvor 1 Jahr

Unfortunately it does happen.

Profilbild von Agustin Falaz
Agustin Falazvor 1 Jahr

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

Profilbild von kortress
kortressvor 1 Jahr

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

Profilbild von Ben Dicken
Ben Dickenvor 1 Jahr

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.

Profilbild von Jeferson
Jefersonvor 1 Jahr

Edge computing can be a good strategy.

Profilbild von Ben Dicken
Ben Dickenvor 1 Jahr

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.

Profilbild von Rajiv Khaneja
Rajiv Khanejavor 1 Jahr

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

Profilbild von network_pun
network_punvor 1 Jahr

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

Profilbild von lala
lalavor 1 Jahr

Nice visual

Profilbild von Devaansh Bhandari
Devaansh Bhandarivor 1 Jahr

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?

Profilbild von Alex Havryleshko
Alex Havryleshkovor 1 Jahr

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.

Profilbild von Josh Stein
Josh Steinvor 1 Jahr

where can I slide it all the way?

Profilbild von Scott | 1A x 2A 🇺🇲
Scott | 1A x 2A 🇺🇲vor 1 Jahr

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

Profilbild von Ben Dicken
Ben Dickenvor 1 Jahr

We've got this info on our pricing page:

Profilbild von Chase Miller
Chase Millervor 1 Jahr

The cost savings is huge too.

Profilbild von Jake Casto
Jake Castovor 1 Jahr

Explain Neon using balls

Ähnliche Videos