The Real Hidden Cost of a Request

  Рет қаралды 32,700

Hussein Nasser

Hussein Nasser

Күн бұрын

Пікірлер: 56
@hnasr
@hnasr 11 ай бұрын
Head to backend.win to grab my fundementals of backend engineering course
@supernovaw39
@supernovaw39 11 ай бұрын
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 8 ай бұрын
Go through the medium article and pen down it somewhere after having a look at this video. Really informative.
@bellybooma
@bellybooma 11 ай бұрын
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 11 ай бұрын
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 11 ай бұрын
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 10 ай бұрын
Really love how amazingly complex this request is and we ignore this. Amazing show video.
@elvispalace
@elvispalace 9 ай бұрын
this channel is so underrated
@sherifalaa5
@sherifalaa5 11 ай бұрын
Great video, I'd love if you dive deeper into how processes is handled and the resources they consume, especially capacity planning
@sidheshwartiwari9834
@sidheshwartiwari9834 11 ай бұрын
You seem to be more interested in system design.. give that a try.
@shapelessed
@shapelessed 11 ай бұрын
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 11 ай бұрын
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 11 ай бұрын
Nice! Thank you Hussein!
@kdcapparelli
@kdcapparelli 11 ай бұрын
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 ? 🤔
@reyuki-i
@reyuki-i 11 ай бұрын
Talk about SNMP (Simple Network Management Protocol) please ^^
@mti2fw
@mti2fw 9 ай бұрын
Awesome!
@btom1990
@btom1990 11 ай бұрын
@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 11 ай бұрын
interesting thanks will check it out!
@IntenseWebs
@IntenseWebs 11 ай бұрын
Good video topic and AWESOME Cow-lick on the hair!
@VasileSurdu
@VasileSurdu 10 ай бұрын
Please do a video about webhooks
@maithammansoor9566
@maithammansoor9566 11 ай бұрын
Make your messages short and simple
@rajashekhar433
@rajashekhar433 11 ай бұрын
1. Do you have any course to become a good nodejs developer with mongo? 2. Basics of system design
@vickylance
@vickylance 11 ай бұрын
Check out his udemy courses
@bogdy.musiclover
@bogdy.musiclover 5 ай бұрын
You talk about the costs ... what about the costs for Spring Boot framework ... traditional approach @RestController ... ?
@leojohn6702
@leojohn6702 10 ай бұрын
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 11 ай бұрын
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
@rick-kv1gl
@rick-kv1gl 11 ай бұрын
love it.
@kiang.9237
@kiang.9237 11 ай бұрын
Thank you Hussein! one question: out of all the stages, would decryption be the slowest?
@freecelpip
@freecelpip 9 ай бұрын
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
@gibraanjafar1669
@gibraanjafar1669 10 ай бұрын
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 10 ай бұрын
Haha I do, I don’t love him that much, I just ordered one and got an extra copy so I now have two.
@ronsn8071
@ronsn8071 11 ай бұрын
2:49 (with headphones on) 😂
@viacheslavnovakovskyi6895
@viacheslavnovakovskyi6895 10 ай бұрын
What makes you positive?
@ronsn8071
@ronsn8071 10 ай бұрын
@@viacheslavnovakovskyi6895 His facial expression just before he farts^^
@viacheslavnovakovskyi6895
@viacheslavnovakovskyi6895 10 ай бұрын
@@ronsn8071 why do you think that he do that?
@ronsn8071
@ronsn8071 10 ай бұрын
@@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 11 ай бұрын
🎉
@mohsinali8450
@mohsinali8450 10 ай бұрын
How is here after ezisnapet video😅
@JamieTransNyc
@JamieTransNyc 11 ай бұрын
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 11 ай бұрын
Ok smart boy
@jay_wright_thats_right
@jay_wright_thats_right 11 ай бұрын
Yeah, this guy never wants to get to the point. LOL
@obaid5761
@obaid5761 11 ай бұрын
Weird way to say ur slow and retarded, Jamie. But you do you ig.
@beneditomauroo
@beneditomauroo 11 ай бұрын
Yes, it’s a fair criticisms of Hussein
@alexandrep4913
@alexandrep4913 11 ай бұрын
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 11 ай бұрын
you talk way too slow, even at 2x you sound slow. Please improve your speech.
@mateoceballos
@mateoceballos 11 ай бұрын
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 6 ай бұрын
🎉
Frontend and Backends Timeouts
24:40
Hussein Nasser
Рет қаралды 12 М.
My Preferred Method of Learning Backend Engineering Technologies
11:40
FOREVER BUNNY
00:14
Natan por Aí
Рет қаралды 30 МЛН
Real Man relocate to Remote Controlled Car 👨🏻➡️🚙🕹️ #builderc
00:24
The problem with software engineering
13:58
Hussein Nasser
Рет қаралды 65 М.
The Real Reason Young People are Not Working
12:04
Economics Help
Рет қаралды 86 М.
TMUX in 100 seconds | Prime Reacts
11:43
ThePrimeTime
Рет қаралды 157 М.
Postgres just got even faster
26:42
Hussein Nasser
Рет қаралды 37 М.
What If Inflation Goes Negative? Deflation Explained
17:00
Explains 101
Рет қаралды 33 М.
How To Train Yourself To Become A Genius
21:08
Tina Huang
Рет қаралды 30 М.
How a Machine Becomes a Router | ip_forward
12:55
Hussein Nasser
Рет қаралды 7 М.
When Will UK Living Standards Slip Behind Poland?
11:21
Economics Help
Рет қаралды 242 М.
When do you use threads?
29:36
Hussein Nasser
Рет қаралды 19 М.
Coding a Web Server in 25 Lines - Computerphile
17:49
Computerphile
Рет қаралды 346 М.