The Real Hidden Cost of a Request

  Рет қаралды 33,814

Hussein Nasser

Hussein Nasser

Күн бұрын

In this video I explore the hidden costs of sending a request from the frontend to the backend
More details here
/ the-journey-of-a-reque...
Discovering Backend Bottlenecks: Unlocking Peak Performance
performance.hu...
Fundamentals of Backend Engineering Design patterns udemy course (link redirects to udemy with coupon)
backend.hussei...
Fundamentals of Networking for Effective Backends udemy course (link redirects to udemy with coupon)
network.hussei...
Fundamentals of Database Engineering udemy course (link redirects to udemy with coupon)
database.husse...
Follow me on Medium
/ membership
Introduction to NGINX (link redirects to udemy with coupon)
nginx.husseinn...
Python on the Backend (link redirects to udemy with coupon)
python.hussein...
Become a Member on KZbin
/ @hnasr
Buy me a coffee if you liked this
www.buymeacoff...
Arabic Software Engineering Channel
/ @husseinnasser
🔥 Members Only Content
• Members-only videos
🏭 Backend Engineering Videos in Order
backend.hussei...
💾 Database Engineering Videos
• Database Engineering
🎙️Listen to the Backend Engineering Podcast
husseinnasser....
Gears and tools used on the Channel (affiliates)
🖼️ Slides and Thumbnail Design
Canva
partner.canva....
Stay Awesome,
Hussein

Пікірлер: 56
@hnasr
@hnasr Жыл бұрын
Head to backend.win to grab my fundementals of backend engineering course
@supernovaw39
@supernovaw39 Жыл бұрын
I absolutely love how you get to the bottom of how things work and strive to never forget or omit the low-level details. For some reason it's really uncommon compared to using things without asking any questions. That is what makes going through the education system so frustrating to me, dogmatic thinking. Your channel is one of my favourites because of this spirit of curiosity. Keep up the good stuff
@srihari5605
@srihari5605 10 ай бұрын
Go through the medium article and pen down it somewhere after having a look at this video. Really informative.
@bellybooma
@bellybooma Жыл бұрын
Really like this. All the abstractions and libraries these days are a double edged sword. Yes you can develop faster, but you are also less aware of what is actually happening computationally.
@megamind452
@megamind452 Жыл бұрын
Nice video, while you were explaining it triggered me the thought of how you handle race conditions if the previous request is waiting and then the next request do some changes in db which first checks in db for an early entry by a call to db. But in second request the things have changed and check which was to be made in db is now bypassed by race conditions or fast multiple requests. I hope this makes sense.
@hnasr
@hnasr Жыл бұрын
aha good point, I can speak to Javascript which is the easiest, but other languages can do it differently and it get complicated with multiple threads where a mapping table may be required. when a request is manifested (right after parse step) a function call is invoked (the callback that is (req, res) those two objects fully populated (client connection) every HTTP request the server gets eventually invoked a function with two local stack vars request and response objects both has reference to the frontend connection (or stream in case of h2). you process the request asynchronous by reading from file async or network to the backend your function gets on pause until you get a callback from the asynchronous read operation and meanwhile your main thread gets another request which invokes another function with its own request and response objects , you also do the same thing you call an async function to do a read and meanwhile you all of a sudden receive a callback from the first request, which the puts you (thanks to javascript closures) back to request 1 and response 1 objects its as if javascript engine sets your state back with all variables to that first request and now you have read the file so you use the response object to write back the response and you will be using the correct object. this is where the power of the language helps, but you can of course not relay on the language and use your own global table and relay on that for lookup.
@YashAmbekar-j3p
@YashAmbekar-j3p Жыл бұрын
Really love how amazingly complex this request is and we ignore this. Amazing show video.
@elvispalace
@elvispalace Жыл бұрын
this channel is so underrated
@sherifalaa5
@sherifalaa5 Жыл бұрын
Great video, I'd love if you dive deeper into how processes is handled and the resources they consume, especially capacity planning
@summertime_sadness456
@summertime_sadness456 Жыл бұрын
You seem to be more interested in system design.. give that a try.
@shapelessed
@shapelessed Жыл бұрын
I won't lie. Sometimes it's best to create a websockets request/response type of simple protocol for your needs and do much of the requests through it instead of fetch/ajax. Way lower latency, no overhead for handshakes, etc. If you're really crazy about it, you can just as well stream images and media like that.
@chebrubin
@chebrubin Жыл бұрын
Hussein has his opinions on Websockets. Check his recent videos. Websockets is a browser implementation that opens a dedicated stream separate from the noisy ongoing request fabric of the browser window object. Definitely has its purpose. This media discussion today is more focused on just HTTP request; not only as a front end traffic. Just in general. I agree a backend established websocket session could be great but not sure from a JVM perspective that is going to scale to handle + 1,000 distinct websocket 1:1 conversations.
@HarshKapadia
@HarshKapadia Жыл бұрын
Nice! Thank you Hussein!
@mti2fw
@mti2fw Жыл бұрын
Awesome!
@IntenseWebs
@IntenseWebs Жыл бұрын
Good video topic and AWESOME Cow-lick on the hair!
@kdcapparelli
@kdcapparelli Жыл бұрын
It resembles Star Trek's teleportation, as the request de-materialize in one end, travels through space, and re-materialize in other point (address) ... 😊 But, by all means, what is then the real cost of a request (in dolar, per request), approximately ? 🤔
@btom1990
@btom1990 Жыл бұрын
@hnasr you should do a video covering L4S aka RFC 9330. This is IMHO a gamechanger in the fight against bufferbloat and high latencies.
@hnasr
@hnasr Жыл бұрын
interesting thanks will check it out!
@VasileSurdu
@VasileSurdu Жыл бұрын
Please do a video about webhooks
@rajashekhar433
@rajashekhar433 Жыл бұрын
1. Do you have any course to become a good nodejs developer with mongo? 2. Basics of system design
@vickylance
@vickylance Жыл бұрын
Check out his udemy courses
@gibraanjafar1669
@gibraanjafar1669 Жыл бұрын
Hussein, why do you have 2 copies of Steve Jobs by Walter Isaacson on your bookshelf behind you? Isn't that redundant? I noticed it today while watching the Caching Techniques video of yours from 3 years ago. :D
@hnasr
@hnasr Жыл бұрын
Haha I do, I don’t love him that much, I just ordered one and got an extra copy so I now have two.
@reyuki-i
@reyuki-i Жыл бұрын
Talk about SNMP (Simple Network Management Protocol) please ^^
@rick-kv1gl
@rick-kv1gl Жыл бұрын
love it.
@maithammansoor9566
@maithammansoor9566 Жыл бұрын
Make your messages short and simple
@bogdy.musiclover
@bogdy.musiclover 7 ай бұрын
You talk about the costs ... what about the costs for Spring Boot framework ... traditional approach @RestController ... ?
@leojohn6702
@leojohn6702 Жыл бұрын
Can you explain system design diagrams at least in a conceptual level? I am an aspiring backend developer, and I find myself building more and more complex (at my level) functions. But each time when I do some basic flow, I find myself doing different implemwntation
@mohammedabdulbary1577
@mohammedabdulbary1577 Жыл бұрын
I thought you will start from the point where the client start to make the request obj we have also a lot of steps to go through until we get the request to be in the wire
@kiang.9237
@kiang.9237 Жыл бұрын
Thank you Hussein! one question: out of all the stages, would decryption be the slowest?
@freecelpip
@freecelpip Жыл бұрын
Nice question I think it is cause the server has to do some computing to decryption and I guess for the response it has to a whole lot of encryption before passing it down to the Network interface
@ronsn8071
@ronsn8071 Жыл бұрын
2:49 (with headphones on) 😂
@viacheslavnovakovskyi6895
@viacheslavnovakovskyi6895 Жыл бұрын
What makes you positive?
@ronsn8071
@ronsn8071 Жыл бұрын
@@viacheslavnovakovskyi6895 His facial expression just before he farts^^
@viacheslavnovakovskyi6895
@viacheslavnovakovskyi6895 Жыл бұрын
@@ronsn8071 why do you think that he do that?
@ronsn8071
@ronsn8071 Жыл бұрын
@@viacheslavnovakovskyi6895 Why he did fart in the video? I don't think he was even aware of it at the time, he was concentrating on what he actually wanted to say. And he probably didn't realize it later when he was editing the video. But if you have headphones on, you can clearly hear it. ... and you can see it in his facial expression. :D
@4747surya
@4747surya Жыл бұрын
🎉
@mohsinali8450
@mohsinali8450 Жыл бұрын
How is here after ezisnapet video😅
@JamieTransNyc
@JamieTransNyc Жыл бұрын
After 5 minutes of waiting for you to get to the point of this video... I gave up and clicked to another video.
@NN-qj4sk
@NN-qj4sk Жыл бұрын
Ok smart boy
@jay_wright_thats_right
@jay_wright_thats_right Жыл бұрын
Yeah, this guy never wants to get to the point. LOL
@obaid5761
@obaid5761 Жыл бұрын
Weird way to say ur slow and retarded, Jamie. But you do you ig.
@beneditomauroo
@beneditomauroo Жыл бұрын
Yes, it’s a fair criticisms of Hussein
@alexandrep4913
@alexandrep4913 Жыл бұрын
What do you mean? Just because you don't know what he is talking about, doesn't mean he didn't address this in the first 2 minutes. TCP, ssl, serialization and processing.
@mmm-ie5ws
@mmm-ie5ws Жыл бұрын
you talk way too slow, even at 2x you sound slow. Please improve your speech.
@mateoceballos
@mateoceballos Жыл бұрын
Nah I really appreciate the way he talks, also while the video is way too long it is nice seeing someone explaining his way of understanding things
@Meisterilyas_333
@Meisterilyas_333 8 ай бұрын
🎉
The effect of Random UUID on database performance
18:51
Hussein Nasser
Рет қаралды 73 М.
Frontend and Backends Timeouts
24:40
Hussein Nasser
Рет қаралды 13 М.
OCCUPIED #shortssprintbrasil
0:37
Natan por Aí
Рет қаралды 131 МЛН
Who is More Stupid? #tiktok #sigmagirl #funny
0:27
CRAZY GREAPA
Рет қаралды 10 МЛН
TLS Handshake Explained - Computerphile
16:59
Computerphile
Рет қаралды 578 М.
Coding a Web Server in 25 Lines - Computerphile
17:49
Computerphile
Рет қаралды 363 М.
What does larger scale software development look like?
24:15
Web Dev Cody
Рет қаралды 1,5 МЛН
Clean Code - Uncle Bob / Lesson 1
1:48:42
UnityCoin
Рет қаралды 2 МЛН
When do you use threads?
29:36
Hussein Nasser
Рет қаралды 24 М.
Google system design interview: Design Spotify (with ex-Google EM)
42:13
IGotAnOffer: Engineering
Рет қаралды 1,2 МЛН
How many kernel system calls do runtimes make?
19:18
Hussein Nasser
Рет қаралды 30 М.
How to Become a Good Backend Engineer (Fundamentals)
26:40
Hussein Nasser
Рет қаралды 546 М.