SQL inside Cloudflare - Deep dive into tech
ฝัง
- เผยแพร่เมื่อ 27 พ.ย. 2024
- WANT to create a business selling courses and content? Go here: fermion.app
WANT to learn programming? Go here: codedamn.com
Follow me on other platforms to stay connected:
x.com/mehulmpt
htps:// mehulmpt
We need a white board explanation of how cloudflare workers work internally
recently used cloudflare workers for the first time, and I am so happy that I was able to understand most of what Mehul told here. If possible more of these (deep dive tech) videos Mehul! You're awesome man 💪
I have been Cloudflare customer since 2016, loved every product of theirs, But behind the scences were always very complex for me to understand and reading TLDR blogs were difficult. Thanks Mehul for going through those and explaining.! Need more such content please. Also salute to your patience to go through such blogs.
Interesting concept.
Personal i may used only for data that i can afford to lose like analytics data or show a data saved state. (there is possibility of loss of 0.01%)
But why they really made Durable object?
They can instead, keep the durable object sqlite db in only RAM.
On initial request, read from very fast local storage to RAM.
Write sqlite db to storage every 30 second to RAM.
Remove from RAM on 1 minute of inactivity.
To keep durable object active, send fake request every 5 second.
First request would take time, that is just fine i believe.
For each db key in durable object, there can be only one database in one region, and or user defined region.
Much slower, but much more reliability.
But RAM are costly in a very large scale. I don't known after writing a long comment, does it make sense or not. Or it is affordable cost or compute wise or not.
But for some use cases i have hope for this technology.
Like for analytics, for a minute collect analytics data and send the data to real server.
Or suppose in real time application, 5 people are collaborating on document, send update to real server in 30 second instead of sending every second.
But when data is not saved to final database server, show not saved in front end UI. (if the durable object does not break, first condition)
Like a long random string can be created and checked between server and durable object.
Video suggestion: comparison between Turso vs Durable objects.
Great video!
These kind of videos are on brand for Theo, but theo's content has a lot of "fluff". Your video was straight to the point, had good questions for the viewer to think about, etc. And no ads or questioning if you are sponsored by the company you are taking about.
Very interesting video found today ..Thanks for sharing the blogs and explanation..amazing ..keep sharing 👍
I'm just loving your content on Cloudflare❤
The location of the durable object is set to the closest data center where the first request accessing the object came from. There is a note in the docs that dynamic relocation is coming in the future, but I think the note has been there since durable objects were launched, 4 years ago.
Literally, enjoyed the deep dive!
deep dive?
Which mic are you using brand & model?
blue yeti
this guy is on fire
Where to get that countdown background
Next - Ryan Carniato blogs
feels like you got mixed up between reads and writes at 17:04. writes are the problematic ones not reads. Reads normally dont fail after you return from a get call. you are saying there is a problem while talking about reads. once a write is successful then all subsequent reads should also succeed. Also there is no way a read can succeeds then subsequently fail. if that happens then cflare has bigger issues than consistency issues. More like reliability issues which are worst. All of this unlike writes which can typically fail after the set call returns. so in cflare thats why they give an example about a write failing after your worker call returns from the sqlite write call
Copying to 5 follower(3 confirmed) machine is unreliable!! 😮😮
Than how many machine you would expect to make it reliable?
no amount of machines. because every single machine that confirms can also crash after confirmation is sent. this system is obviously very very reliable. but mathematically it is not 100%.
@@codedamn in the video, you made it sound like there's another similar product that's 100% reliable, and that's why Cloudflare is at a disadvantage.
What I'm missing?
hmmmmmmmmmmmmmm
hello first