Shadowing Practice: NGINX Explained - What is Nginx - Learn English Speaking with Video

Les maken...
1
By the end of this video, you will know not only what Nginx is,
2
but also why it was created and what it's used for with real life examples.
3
Back in the day when the web was still simple with less users, the basic use case was a browser requested a web page from one web server.
4
The web server was a server machine that had a software installed on it
5
that assembled the page and sent it back to the browser, which then displayed it to the user a piece of software
6
that runs on a server machine and can respond to requests from a browser.
7
And that web server software, that was Nginx, a piece of software that runs on a server machine and can respond to requests from a browser.
8
Then web became popular, so you had thousands or millions of requests per website.
9
Imagine one single server handling millions of requests.
10
That's way over the technical limit of a server software.
11
Well, we need a few more servers to handle that load.
12
So we added 10 Nginx web servers.
13
But now we need something that determines where requests from the browser and which one of those 10 servers will handle them.
14
And that's where load balancing comes in.
15
So the same Nginx web server becomes a load balancer that proxies the requests to those 10 web servers.
16
And by the way, the word proxy means to do something on someone else's behalf.
17
So it accepts the browser requests on behalf of the web servers.
18
like a concierge
19
and then distributes the load among the web servers now how does it distribute the load
20
that depends on whichever algorithm was configured on it it could
21
be a simple logic such as just whichever server is least busy gets the request
22
or it could be a round robin which is a popular algorithm
23
that basically distributes the requests equally in a cyclical manner So very simple load balancing logic.
24
So now we have Nginx as web server software.
25
and the proxy as well and
26
that load balancing is just one of the functionalities of nginx proxy
27
so it's the same server and technology but with a different task now
28
so what are those other features or functionalities of a proxy
29
Imagine New York Times article comes out and millions of people open it on their laptops in the browser.
30
Now imagine every time the request landed with one of the web servers that assembled the response,
31
like put the images together, get them from a database, put text and paragraphs and everything together, edit all the links, sent it back as a response.
32
to assemble this article, get all the data from a database, put the text and links and everything together once and store it.
33
It's a static article, it's not going to change, right?
34
So just keep one final copy and send it to everyone who requests it.
35
That's caching functionality and it is another main feature of Nginx Proxy server.
36
So you can configure caching on Nginx Proxy
37
so you don't have to hit the database or the web servers every time a request comes in.
38
It will just return that cached file.
39
Now imagine we have 100 servers of an online banking application or a social network like Facebook.
40
That makes those servers a pretty juicy target for hackers.
41
They all want to hack into your servers and get the treasure, which is payment data, personal data, passwords, and so on.
42
Now imagine you exposed all 100 servers to public access.
43
So basically all those requests can directly hit each of the web servers.
44
hackers so much easier.
45
They would need to find just one issue in one of those hundred servers, and they could potentially break into your entire system.
46
Because all your servers are publicly accessible directly, they can just ping the hell out of them
47
and probe them until they find an issue or an entry because you forgot to update a library or a software package, and they can hack your web server application.
48
So you have to worry about absolutely perfectly securing hundred servers.
49
Instead, we just give them one server.
50
That is the only one that's publicly accessible.
51
You can put all your tightest security efforts on one server instead of 100 servers.
52
And this way having one entry point, which is the proxy, as publicly accessible entry point,
53
reduces the security attack surface tremendously and basically acts like a shield or security layer before all those web servers.
54
So in addition to load balancing and caching,
55
a very, very important functionality of a proxy is an edit security for your web servers.
56
Now talking about security, I mentioned that since we have one entry point, we can focus all our efforts to securing that one proxy server in all aspects.
57
And one important security measure is encrypted communication.
58
So front -end will send encrypted message to the proxy, which means even if an attacker sees that traffic on user's browser or during the transmission, they can't read it.
59
Only the proxy server can decrypt it.
60
But again, for edit security in many systems, proxy that acts as a shield,
61
a security shield, will simply pass on that encrypted message to the web servers and the web server will decrypt it.
62
itself which is actually a better security practice.
63
So here the functionality of a proxy is to be able to accept encrypted traffic with SSL encryption.
64
So you can configure your proxy to deny any requests that is not encrypted and only accept encrypted requests.
65
Now imagine Netflix, which by the way uses Nginx in its backend.
66
And as we know, Netflix has millions of users, so it's getting millions of requests for videos on its web servers.
67
And let's say it's an evening in New York, millions of people come home after work, All at the same time,
68
they switch on Netflix and start watching the most popular series at that time.
69
That means suddenly at the very same time, millions of requests for a high quality video is sent to Netflix.
70
So in this case, imagine
71
that Nginx proxy server would have to send back the entire high quality video to millions of users at once.
72
That's a lot of bandwidth.
73
internet cables all the way to the TVs of millions of viewers.
74
That's where compression helps nginxproxy can also be configured to compress large images
75
or video files to save bandwidth both on the side of the clients
76
so people who are receiving those large files
77
but also on the server side who is sending all
78
that content so it arrives faster and it uses up less of your internet bandwidth
79
and as part of it it also supports sending responses in chunks instead of the entire
80
part of the video and then by the time you have watched the first half, the second half of the video has been sent over to you as well.
81
So these are all the functionalities that you can configure for Nginx as a proxy server.
82
Now, you may be thinking, how do you make Nginx do all these things?
83
How do you configure them?
84
How do you tell Nginx whether it should act as a web server or a proxy server?
85
And how do you configure all this caching and SSL traffic and all this stuff?
86
Well, that's where Nginx configuration file comes in, which lets you define all this configuration with so -called directives.
87
This is where you can define whether you want your Nginx to be a web server or a proxy server,
88
simply by configuring whether it should forward the traffic to other web servers or whether it should handle it itself.
89
You can configure which port you want Nginx server to listen on.
90
This is an example of a simple web server configuration
91
that listens on port 80
92
and with location basically defines from where in the file system it should serve those static files back but as we learned,
93
communicating on port 80 or HTTP port is insecure.
94
Instead, we want to encrypt all the communication.
95
And you can configure
96
that easily in Nginx to route any traffic coming on port 80 to HTTPS by sending those requests to HTTPS endpoint.
97
key and the private key for the SSL communication and it listens on the HTTPS port 443.
98
So that's a simple configuration that allows you to tweak Nginx to handle requests like that.
99
You also have its own configuration to configure load balancing to multiple backend servers
100
and within that configuration you can also define which load balancing algorithm to use like select the least which as I said,
101
just equally distributes the load in a cyclical order between those servers.
102
You also have the caching configuration with multiple different elements, like how long the cache should be stored before it's refreshed and so on.
103
And as you see, the configuration of all these functionalities is pretty straightforward, and it's also pretty granular.
104
Like you can do tons of different configurations with Nginx, directives in this list here,
105
which is a pretty huge list, and you see the configurations for proxy functionalities have proxy prefix, so you can differentiate them as well.
106
Now, Nginx is very flexible, as you see, and super fast as well.
107
So it became very popular in containers as well
108
and made its way as one of the most popular solutions for Kubernetes Ingress Controller functionality.
109
Ingress Controller is essentially a proxy with advanced load balancing functionality, but for Kubernetes.
110
So what Nginx was doing for simple web servers, it's now doing for Kubernetes Cluster in the form of Ingress Controller.
111
proxy and load balancer that receives the incoming traffic first and then based on the configuration that we define,
112
forwards it to the right service inside the cluster.
113
Now, this load balancing configuration as well as the logic is more advanced and more Kubernetes specific, but the idea is pretty much the same.
114
And I actually have full videos on Ingress and Ingress controller and how to configure it.
115
You can watch on my channel.
116
In fact, I create these tutorials regularly on a lot of interesting technology.
117
So if you want to educate yourself in tech, make sure to subscribe and activate notification to get those new tutorial videos.
118
Now there are actually many English controller implementations out there for Kubernetes but Nginx is one of the most popular ones.
119
And I have actually used Nginx Ingress Controller in most of my projects as well.
120
Now, some of you may be thinking, doesn't each cloud platform have its own load balancer?
121
Why do I need Nginx as a load balancer?
122
Well, you actually need both.
123
Nginx Ingress Controller, which acts as a load balancer, is used inside the cluster.
124
accessible so you can't access the nginx ingress controller directly from the browser it actually lives inside the cluster network
125
and forwards the requests internally
126
so who is getting the requests from public what is the
127
public entry point for the browser requests that's the cloud load balancer like aws elb for example
128
which then forwards that request to the ingress controller inside the very important security layer to those requests.
129
So the cluster component is never directly exposed to public access.
130
Instead, every request comes from the cloud load balancer, which then forwards it to the Ingress controller within the cluster,
131
which then routes the traffic based on intelligent logic to different applications within the cluster.
132
And with intelligent routing, what I mean is, of sub -segments or microservices, for example, you can configure your English controller.
133
So if the request URL includes Online cart, it routes the traffic to online cart microservice.
134
If it includes payment, it routes the traffic to payment service and so on.
135
Now, some of you who've been in IT for a little longer may have worked with Apache web server.
136
So what's the difference between Apache web server and Nginx web server?
137
Well, not much, actually.
138
Nginx and Apache web servers do pretty much the same thing.
139
Just like Nginx, Apache also used to be a basic web server,
140
extended its functionality as a proxy and it has all these benefits and functionalities of a proxy that we discussed.
141
Apache was actually already widely used when Nginx was created and the major benefit of Nginx was that it was faster,
142
more lightweight and definitely had an advantage when it came to serving huge amounts of static files.
143
Plus, as you saw, it has a pretty easy configuration as well.
144
And Nginx also became more popular in the container world.
145
Now, I hope you got a clear overview of what Nginx is
146
and hope I've answered all the questions you may have had while learning about Nginx.
147
And with that, thank you for watching and see you in the next video.

Context & Background

In the video titled "NGINX Explained - What is Nginx," the speaker outlines the evolving role of NGINX in the web landscape. Initially, web servers were sufficient for handling browser requests; however, with the exponential growth of internet users, NGINX transitioned to handle increased traffic demands effectively. This transition includes functionalities such as load balancing, caching, and enhanced security measures. By the end of the video, viewers not only gain a strong understanding of NGINX but also practical real-life applications that showcase its importance in web infrastructure.

Top 5 Phrases for Daily Communication

  • “What is Nginx?” – A fundamental question that opens discussions about web technology.
  • “Load balancing” – Often used in tech conversations to describe distributing traffic across multiple servers.
  • “Caching functionality” – A critical term in discussing performance optimization for web applications.
  • “Assembling the page” – Refers to the process of creating a fully functional web page from various components.
  • “Publicly accessible server” – A phrase used when discussing security and server management in terms of web accessibility.

Step-by-step Shadowing Guide

To effectively engage with this video while improving your speaking abilities, follow these step-by-step techniques:

  1. Select the Right Tools: Use a shadowing app or shadowing site to play the video and practice simultaneously. This will enhance your immersion and understanding.
  2. Listen Actively: Play the video and focus solely on the speaker’s pronunciation and intonation. Note any unfamiliar phrases that interest you, such as “load balancing” or “caching functionality.”
  3. Repeat in Real-Time: Start shadowing by speaking out loud as the speaker talks, mimicking their rhythm and tone. This practice is crucial for mastering pronunciation and fluency, beneficial for IELTS speaking practice.
  4. Break It Down: If you encounter challenging sections, rewind and listen to them multiple times until you’re comfortable repeating what you've heard.
  5. Reflect and Expand: After shadowing the video, write a brief summary about what NGINX is and its uses. This will reinforce your understanding and help solidify new vocabulary.

By utilizing these techniques, you can significantly enhance your English learning journey through practical exercises anchored in real-world contexts, especially when you learn English with YouTube. Incorporating these phrases and shadowing strategies will bolster your speaking skills and overall comprehension.

Wat is de Shadowing-techniek?

Shadowing is een wetenschappelijk onderbouwde taalleermethode die oorspronkelijk is ontwikkeld voor professionele tolkentraining en gepopulariseerd door polyglot Dr. Alexander Arguelles. De methode is eenvoudig maar krachtig: je luistert naar native Engelse audio en herhaalt het onmiddellijk hardop — als een schaduw die de spreker volgt met slechts 1–2 seconden vertraging. In tegenstelling tot passief luisteren of grammaticadrills, dwingt shadowing je hersenen en mondspieren om echte spraakpatronen tegelijkertijd te verwerken en te reproduceren. Onderzoek toont aan dat het de uitspraaknauwkeurigheid, intonatie, ritme, verbonden spraak, luisterbegrip en spreekvaardigheid aanzienlijk verbetert — waardoor het een van de meest effectieve methoden is voor IELTS Speaking-voorbereiding en echte Engelse communicatie.

Shadowing-techniek: lees de volledige stap-voor-stap-gids →