国产一级a片免费看高清,亚洲熟女中文字幕在线视频,黄三级高清在线播放,免费黄色视频在线看

打開(kāi)APP
userphoto
未登錄

開(kāi)通VIP,暢享免費(fèi)電子書(shū)等14項(xiàng)超值服

開(kāi)通VIP
使用nginx負(fù)載均衡,webbench做壓力測(cè)試出現(xiàn)的問(wèn)題,求助
nginx負(fù)載均衡壓力測(cè)試并發(fā)session
臺(tái)式機(jī)配置:雙核4G內(nèi)存
VM開(kāi)了三個(gè)虛擬機(jī):一個(gè)做nginx服務(wù)器,設(shè)memory1G,ip:10.10.21.134;兩個(gè)做web服務(wù)器,使用的是自己裝的Q2A網(wǎng)站,memory都是1G,ip分別為:10.10.21.135,10.10.21.138
nginx.conf主要內(nèi)容:
worker_processes  2;
events {
worker_connections  1024;
}
http {
include       mime.types;
default_type  application/octet-stream;
sendfile        on;
keepalive_timeout  65;
#均衡
upstream webservers{
server 10.10.21.135 max_fails=3 fail_timeout=1s weight=1;
server 10.10.21.138  max_fails=3 fail_timeout=1s weight=1;
server 127.0.0.1:8080 backup;
#緩存
proxy_cache_path /nginx/cache/first levels=1:2:1 keys_zone=a:20m max_size=1g;
server {
listen       80;
server_name  localhost;
location / {
proxy_pass http://webservers/;
proxy_set_header X-Real-IP $remote_addr;
proxy_connect_timeout 300;
proxy_read_timeout 300;
proxy_send_timeout 300;
proxy_cache a;
#js與css請(qǐng)求
location ~.*\.(gif|jpg|jpeg|png|bmp|swf|css|js)$
{
proxy_pass http://10.10.21.135;
}
}
}
apache2.conf的最主要配置:
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
<IfModule mpm_prefork_module>
StartServers          5
MinSpareServers       5
MaxSpareServers      6
ServerLimit         550
MaxClients          500
MaxRequestsPerChild   10000
</IfModule>
HostnameLookups Off
使用webbench做測(cè)試時(shí),60S并發(fā)1000時(shí)基本均衡,漏掉的請(qǐng)求也不是很多,60S并發(fā)1500做測(cè)試時(shí),使用grep 'GET /' /var/log/nginx/access.log | grep '15/Sep/2014:19'|wc -l  命令對(duì)access.log做計(jì)算時(shí)結(jié)果如下:
nginx服務(wù)器:
兩個(gè)web:
結(jié)果漏了很多請(qǐng)求
error.log內(nèi)容:
nginx:2014/09/15 19:30:04 [error] 29561#0: *7668 connect() failed (110: Connection timed out) while connecting to upstream, client: 10.10.21.137, server: localhost, request: "GET / HTTP/1.0", upstream: "http://10.10.21.135:80/", host: "10.10.21.134"
135服務(wù)器:
[error] [client 10.10.21.134] PHP Notice:  session_start(): ps_files_cleanup_dir: opendir(/var/lib/php5) failed: Permission denied (13) in /var/www/question2answer/qa-include/qa-app-users.php on line 150
138服務(wù)器:
[error] [client 10.10.21.134] request failed: error reading the headers
難道這就是極限了嗎?還是我的配置數(shù)據(jù)有問(wèn)題啊?
怎樣優(yōu)化nginx的配置呢?
尋求這位的幫助~~ 更多 分享到:
相關(guān)推薦:性能測(cè)試之Nginx性能調(diào)優(yōu)
各類接口測(cè)試實(shí)戰(zhàn)合集
CSDN攢課第二期:高并發(fā)Web網(wǎng)站構(gòu)建和安全防護(hù)
WebGL 實(shí)戰(zhàn)
本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊舉報(bào)。
打開(kāi)APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
nginx upstream 容錯(cuò)機(jī)制 原創(chuàng)
nginx 灰度發(fā)布(基于cookies)
nginx?根據(jù)?短鏈接?分發(fā)跳轉(zhuǎn)服務(wù)器
PHP常用的緩存技術(shù)匯總
Nginx代理功能與負(fù)載均衡詳解
nginx location、Rewrite、proxy_pass 配置
更多類似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長(zhǎng)圖 關(guān)注 下載文章
綁定賬號(hào)成功
后續(xù)可登錄賬號(hào)暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服