linux--nginx--Reverse Proxy Server

Source: Internet
Author: User

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:

    1. Nginx is a performance-oriented design of the HTTP server, compared to Apache, lighttpd, with less memory, high stability and other advantages.
    2. 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 .
    3. Modular Design , Rich module Library and third-party module library, flexible configuration .
    4. 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

    1. 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.