原生CAS, 在loadrunner 500并发下,表现良好,但集成了NGINX后出现的瓶颈。
下面是对NGINX的配置,解决问题:
#
upstream cas_server {
server 192.168.XX.35:8880 max_fails=3 fail_timeout=3s weight=9;
server 192.168.XX.67:8080 max_fails=3 fail_timeout=3s weight=9;
#keepalive 16;
keepalive 128;
}
server {
listen 80;
server_name localhost;
location /cas {
access_log logs/oacas.XXX.com-casserver_acc.log main;
error_log logs/oacas.XXX-casserver_err.log warn;
client_body_buffer_size 128k;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_connect_timeout 120; #60
proxy_send