Since the website updated AAF, the load on the www site Server (IIS) has been continuously increasing, from the average 30% to 70%; the CPU has maintained such a high load, there will be problems; then we started to try to use Nginx to hold the IIS server in front to reduce the load on the IIS server. Nginx is used as the response proxy. In this architecture, Nginx is placed in a VIPPool below F5.
Since the website updated AAF, the load on the www site Server (IIS) has been continuously increasing, from the average 30% to 70%; the CPU has maintained such a high load, there will be problems; then try to use Nginx to hold the IIS server in front to reduce the IIS server load;
Nginx is used as the response proxy,
ArchitectureIn this case, Nginx is placed in a VIP Pool below F5, and Nginx returns the Proxy from IISPoo. The configuration file is as follows:
User daemon; Worker_processes 8; Error_log/usr/local/nginx/logs/nginx_error.log crit; PId/Var/run/nginx. pid; # Specifies the value for maximumFileDescriptors that can be openEdBy this process. Worker_rlimit_nofile 65535; Events { Use epoll; Worker_connections 65535; } Http { INcLude mime. types; Default_type appliCatIon/octet-sTrEam; CharSetUTF-8; Server_names_hash_bucket_size 128; Client_header_buffer_size 32 k; Large_client_header_buffers 4 32 k; Client_max_body_size 300 m; SenDfIle on; TCp_ Nopush on; Tcp_nodelay on; Keepalive _TimeOut 60; Client_body_buffer_size 512 k; Proxy_connect_timeout 5; Proxy_read_timeout 60; Proxy_send_timeout 5; Proxy_buffer_size 16 k; Proxy_buffers 4 64 k; Proxy_busy_buffers_size 128 k; Proxy_temp_file _Write_ Size 128 k; GZipOn; Gzip_ Min_length 1 k; Gzip_buffers 4 16 k; Gzip_http_version 1.1; Gzip_comp_level 2; Gzip_types tExT/plain application/x-javascript text/css application/xml; Gzip_vary on; Upstream myproject { Server x. x weight = 3; } Server { Listen 80; Server_name www.xxxx.com; Location /{ Proxy_set_header Host $ host; Proxy_set_header X-Forwarded-For $ remote_aDdR; Proxy_pass http: // myproject; } } Server { Listen 80; Server_name xxxx.com; Location /{ Proxy_set_header Host $ host; Proxy_set_header X-Forwarded-For $ remote_addr; Proxy_pass http: // myproject; } } Server { Listen 80; Server_name x. x; Location/NginxStatUs { Stub_status on; Access_log off; Auth_basic "NginxStatus "; # Auth_basic_user_file htPasswd; } } }
|