Brief introduction and application scenario of nginx


brief introduction

Nginx is a lightweight web server developed by Russian programmer Igor sisov.

Compared with tomcat, nginx has excellent performance, can support 5W concurrent connections (while Tomcat can only support 200-400), and its CPU and memory consumption is very low, running very stable.

Nginx has many functions, but we usually use it as static resource server, load balancing server and reverse proxy server.


Application scenario

Static agent:

You can deploy static resources, HTML JS CSS image


Load balancing:

load balancing(Load Balance)This means that a load is allocated to multiple operating units for execution 

If the browser wants to access the server, it will first arrive at the load balancing server, which will distribute the traffic to different application servers through certain scheduling algorithm



Reverse proxy:

First of all, let’s talk about the agent

Proxy: provides a proxy object for an object, and the proxy object controls the reference of the original object. In short, it provides an external proxy object for an object, which is called by others, and then the proxy object controls the execution of the proxy object.


 Reverse proxyIt isYesServer sideActing as agent

As a client, we only need to send the request to the reverse proxy server, which selects the target server to obtain the data, and then responds to the client,

At this time, the reverse proxy server and the target server are external servers, exposing the proxy server address and hiding the real server IP address.


We’re done with reverse agent. By the way, forward agent


Forward agency: YesClientActing as agent

As a client, we want to access some servers, but the servers block our access. At this time, we need a proxy server, which can access the servers we want to access,We can give the client to this proxy server to help us access.








Recommended Today

Python crawler (7): http Basics

Life is short, I use python Previous portal: Xiaobai’s Python crawler (1): Opening Python crawler (2): preparation (1) installation of basic class library Learn Python crawler (3): preparation (2) introduction to Linux Xiaobai’s Python crawler (4): preparation (3) introduction to docker Python crawler in Xiaobai school (5): pre preparation (4) database foundation Python crawler (6): […]