NGINX Internal Architecture - Workers

  Рет қаралды 41,737

Hussein Nasser

Hussein Nasser

Күн бұрын

In this video I explain the NGINX internal process architecture, how NGINX spins up multiple processes per core, how each process is pinned to a CPU core for minimum context switching, how NGINX accepts connections , parses requests and talks to the backend.
Get my introduction to NGINX udemy course
nginx.husseinnasser.com
Fundamentals of Networking for Effective Backends udemy course (link redirects to udemy with coupon)
network.husseinnasser.com
Fundamentals of Database Engineering udemy course (link redirects to udemy with coupon)
database.husseinnasser.com
Introduction to NGINX (link redirects to udemy with coupon)
nginx.husseinnasser.com
Python on the Backend (link redirects to udemy with coupon)
python.husseinnasser.com
Become a Member on KZbin
/ @hnasr
Buy me a coffee if you liked this
www.buymeacoffee.com/hnasr
Arabic Software Engineering Channel
/ @husseinnasser
🔥 Members Only Content
• Members-only videos
🏭 Backend Engineering Videos in Order
backend.husseinnasser.com
💾 Database Engineering Videos
• Database Engineering
🎙️Listen to the Backend Engineering Podcast
husseinnasser.com/podcast
Gears and tools used on the Channel (affiliates)
🖼️ Slides and Thumbnail Design
Canva
partner.canva.com/c/2766475/6...
Stay Awesome,
Hussein

Пікірлер: 34
@hnasr
@hnasr Жыл бұрын
Get my introduction to NGINX udemy course nginx.husseinnasser.com
@RajnishAhuja
@RajnishAhuja Жыл бұрын
Hussein, Do you have a course on istio and certificate management ( By you or somebody you respect ) ?
@tempaccount8256
@tempaccount8256 Жыл бұрын
Hussein, your contents are always awesome, with a lot of information. I was wondering if you can tell us about your past experiences and how you get to the place you're now, and also what's your current stack? And more😁😁, We will be lucky😅
@shubhamdhal689
@shubhamdhal689 Жыл бұрын
First Comment on a Hussein Nasser vid :) One thing to note is how fast KZbin is able to serve the video in my feed. I think I started watching this almost as soon as Hussein uploaded the video(it was saying zero views, but ofcourse that counter is eventually consistent and is cached at multiple layers). KZbin recommendations is truly a feat of engineering
@franpereyra5459
@franpereyra5459 Жыл бұрын
It would be great to see an explanation like this, about Apache web server, in order to understand the main differences with Nginx (pros and cons). Amazing explanation, thank you!
@hnasr
@hnasr Жыл бұрын
Great idea
@nickkman90
@nickkman90 9 ай бұрын
Fabulous lecture! Thanks Hussein.
@nikhilsinghal1315
@nikhilsinghal1315 Жыл бұрын
I work on nginx modules a lot. You should also discuss the moduler way of adding new code in nginx. The code architecture of nginx is pretty neat.
@rio512hsu
@rio512hsu Жыл бұрын
Any good reading material recommended?
@krishnamohanyerrabilli4040
@krishnamohanyerrabilli4040 Жыл бұрын
👏 thanks for this, clearly understood what's happening behind the scenes
@shreemaan-abhishek
@shreemaan-abhishek Жыл бұрын
Oh hey!
@blevenzon
@blevenzon Жыл бұрын
Thank you for the clear and concise explanation 😊
@habibicoding
@habibicoding Жыл бұрын
Very interesting, good job, shater/شاطر!
@KuldeepYadav-jn3ld
@KuldeepYadav-jn3ld Жыл бұрын
Could you please have a small session about Public Suffix List ?
@TylerRake141
@TylerRake141 Жыл бұрын
I would love to watch more stuff like these, it could be a series like e.g. IIS, Apache architecture etc
@rehaanmazid2435
@rehaanmazid2435 Жыл бұрын
Hey @Hussien, When a NGINX server is set up in docker. What happens to the worker process and core mapping? I assume it will not map to the host machines cpu cores. What happens in this case?
@SB-qm5wg
@SB-qm5wg Жыл бұрын
nginx is one of those things I've barely admin'ed at jobs but never put time in to master.
@AjithkumarSekar
@AjithkumarSekar Жыл бұрын
This is great. Can you also talk about CGI (Common Gateway Interface) and why we need it?
@faizsyed658
@faizsyed658 Жыл бұрын
Do you want internal architecture of CGI? If you just wanna better understand about cgi, there are many good videos from other channels already
@dimtass
@dimtass Жыл бұрын
A good strategy, especially to bare metal embedded servers is to use SMP IRQ affinity and map the netif IRQ to a single core. Then only use the rest cores to handle requests. This will improve the performance a lot.
@thescubabuba6470
@thescubabuba6470 Жыл бұрын
Is there a way to calculate how many connections a worker can handle simultaneously?
@hnasr
@hnasr Жыл бұрын
I think this is a very good question and needs low level kernel level and logging to see how much latency is added with 1 , 2 and 3 and then 4 threads. And then seeing how many requests can be processed with each configuration
@achrefnabil2463
@achrefnabil2463 Жыл бұрын
I think if you wanna calculate the maximum number of connections per worker process you should divide the system file descriptor limit by the number of worker processes. For example, if the file descriptor limit is 1024 and there are 4 worker processes each worker process can handle up to 256 connections simultaneously
@manojBadam
@manojBadam Жыл бұрын
How does file descriptors come into picture for handling more connections?
@TylerJusCodes
@TylerJusCodes Жыл бұрын
Hey .. long time my friend. been awhile I visited here.
@seanknowles9985
@seanknowles9985 10 ай бұрын
How to build a http3 client, I am struggling to get my head around why some http libraries are still http1 and why they've not been updated? (this could be interesting content)!
@raghavgupta1799
@raghavgupta1799 Жыл бұрын
This topic should be in the Indian Engineering courses as a separate subject.
@mohammedabulsoud1819
@mohammedabulsoud1819 Жыл бұрын
so goood
@abelsimon5308
@abelsimon5308 Жыл бұрын
planning a course on envoy as well? (have seen your TL-DR about the proxy)
@hnasr
@hnasr Жыл бұрын
made a video on envoy but im not satisfied with it. need to redo it.
@abelsimon5308
@abelsimon5308 Жыл бұрын
​@@hnasr maybe a udemy course if you fancy would be even better I've thoroughly enjoyed the nginx one. It does also help with the bigger picture when having multiple layers of proxies. E.g a project I'm working on right now, we're having an HA proxy and two envoys for egress. (one sidecar with custom listeners set up for port forwarding, and one egress in a DMZ to fulfil these forwards)
@erlangparasu6339
@erlangparasu6339 Жыл бұрын
is nginx open source?
@KhanKhan-ym4mo
@KhanKhan-ym4mo Жыл бұрын
u shud take some presentation / communication skills training, ur videos are very monotonous and uninteresting, despite having valuable content. i hope you will take it positively and improve urself.
django Architecture - Connection Management
15:10
Hussein Nasser
Рет қаралды 40 М.
Postgres Internal Architecture Explained
33:16
Hussein Nasser
Рет қаралды 141 М.
YouTube's Biggest Mistake..
00:34
Stokes Twins
Рет қаралды 70 МЛН
Did you find it?! 🤔✨✍️ #funnyart
00:11
Artistomg
Рет қаралды 112 МЛН
Маленькая и средняя фанта
00:56
Multi DO Smile Russian
Рет қаралды 3,7 МЛН
Cloudflare is moving away from NGINX | The Backend Engineering Show
25:15
Proxy vs Reverse Proxy Server Explained
14:18
Hussein Nasser
Рет қаралды 128 М.
How Discord Stores Trillions of Messages | Deep Dive
1:08:33
Hussein Nasser
Рет қаралды 172 М.
What is a Server? (Deepdive)
17:51
LiveOverflow
Рет қаралды 160 М.
How CPU Efficient is your App?
19:50
Hussein Nasser
Рет қаралды 13 М.
How Prometheus Monitoring works | Prometheus Architecture explained
21:31
TechWorld with Nana
Рет қаралды 985 М.
Apache vs NGINX
7:53
IBM Technology
Рет қаралды 244 М.
Google system design interview: Design Spotify (with ex-Google EM)
42:13
IGotAnOffer: Engineering
Рет қаралды 956 М.
СЛОМАЛСЯ ПК ЗА 2000$🤬
0:59
Корнеич
Рет қаралды 2,5 МЛН
Купите ЭТОТ БЮДЖЕТНИК вместо флагманов от Samsung, Xiaomi и Apple!
13:03
Thebox - о технике и гаджетах
Рет қаралды 76 М.
📱 SAMSUNG, ЧТО С ЛИЦОМ? 🤡
0:46
Яблочный Маньяк
Рет қаралды 1,1 МЛН
Edit My Photo change back coloured with Bast Tech
0:45
BST TECH
Рет қаралды 334 М.