1. Introduction:
Nginx is a Web server that can proxy http, HTTPS, SMTP, IMPS, POP3 protocol connections, as well as a load balancer, and HTTP caching.
2. Features:
- Nginx is a performance-oriented design of the HTTP server, compared to Apache, lighttpd, with less memory, high stability and other advantages.
- Nginx does not adopt the design model of each client thread, but uses the asynchronous logic to reduce the context scheduling cost , so the concurrency service is more powerful .
- Modular Design , Rich module Library and third-party module library, flexible configuration .
- In Linux operating system, Nginx uses epool time model , because of this, nginx is very efficient under the Linux operating system ,
3, can be a large number of parallel processing:
- Nginx in the official test results, can support 50,000 parallel connections, and in the actual operation, can support 20,000 to 40,000 parallel connections .
4, Nginx Service Introduction
- Startup script:
1#! /bin/Bash2 # Parameters3 ###################################4prefix="."5Server="${prefix}/bin/nginx"6std_log="${prefix}/logs/std.log"7err_log="${prefix}/logs/std.log.err"8Exec_user="Root"9 ####################################Ten One if[' whoami '! =${exec_user}]; Then Aecho must use ${exec_user}! -Exit1 - fi the -Killall-9Nginx - -Rm-f logs/Access_log +/sbin/sysctl-w net.ipv4.tcp_timestamps=1 //the TCP timestamp (which increases by 12 bytes in the TCP header) enables the calculation of RTT (round-trip time: round-trip delay) to be enabled with a more precise method of sending timeouts (refer to RFC 1323) and this option should be enabled for better performance. 1-enabled, 0-disabled -/sbin/sysctl-w net.ipv4.tcp_tw_recycle=1 //time-wait sockets can be recycled more quickly. + A${server}-P ${prefix}1>>${std_log}2>>${err_log} &
The sysctl command is used to dynamically modify the kernel's operating parameters while the kernel is running, and the available kernel parameters are in directory/proc/sys. It contains advanced options for both the TCP/IP stack and the virtual memory system, which allows experienced administrators to improve compelling system performance. More than 500 system variables can be read with Sysctl.
Specific introduction See: Http://man.linuxde.net/sysctl, http://www.cnblogs.com/fczjuever/archive/2013/04/17/3026694.html
5.
linux--nginx--Reverse Proxy Server