Nginx learn the basics []

Nginx(engine 'X')

Features:

Reverse Proxy (proxy server the sites I visited, a reverse proxy.)

(What is a forward proxy? Using VPN over the wall, the local access network, the unit is VPN agent for forward proxy.)

Action: information write multiple location, write a different server in the location of

Load Balancing

: In the upstream in charge of writing a balanced way.

Polling a first (default)

Each request individually assigned to a different time order back-end server, if the back-end server down. Off automatically removed.

The second weight

weight represents the weight defaults to 1, higher weights are assigned clients more

The third ip_hash

Hash result for each request assigned by the ip access, so that each guest access to a fixed back-end server

The fourth fair (third party)

Preferentially allocated according to the response time of the backend server allocation request, the response time is short

Static and dynamic separation (static data on the agent: JS, CSS, images; dynamic data put on the server: dynamic interface, real-time computing;)

: Add a static file path in the location of the server

   

And Apache difference:

Apache: a request for a thread -> not high concurrency

Nginx module architecture low coupling efficiency is high

   

performance:

C1M = one million

   

How to practice in engineering:

Time stamping on the page; add floating; spam filtering request;

Guess you like

Origin www.cnblogs.com/xukaiae86/p/12422974.html