中文亚洲精品无码_熟女乱子伦免费_人人超碰人人爱国产_亚洲熟妇女综合网

當(dāng)前位置: 首頁 > news >正文

做網(wǎng)店哪個網(wǎng)站好seo排名快速

做網(wǎng)店哪個網(wǎng)站好,seo排名快速,web網(wǎng)站做二級標(biāo)題是什么意思,杭州企業(yè)網(wǎng)站制作公司1、簡介說明 nginx是常用的反向代理和負(fù)載均衡服務(wù),具有強大并發(fā)能力、穩(wěn)定性、豐富的功能集、低資源的消耗。 nginx自身是沒有針對后端節(jié)點健康檢查的,但是可以通過默認(rèn)自帶的ngx_http_proxy_module 模塊和ngx_http_upstream_module模塊中的相關(guān)指令來完…

1、簡介說明

????????nginx是常用的反向代理和負(fù)載均衡服務(wù),具有強大并發(fā)能力、穩(wěn)定性、豐富的功能集、低資源的消耗。

????????nginx自身是沒有針對后端節(jié)點健康檢查的,但是可以通過默認(rèn)自帶的ngx_http_proxy_module 模塊和ngx_http_upstream_module模塊中的相關(guān)指令來完成當(dāng)后端節(jié)點出現(xiàn)故障時,自動切換到健康節(jié)點來提供訪問。

????????nginx的健康檢查有兩種,一種是被動健康檢查,也就是nginx自帶健康檢查模塊ngx_http_upstream_module,另一種就是主動健康檢查,使用第三方模塊nginx_upstream_check_module。

nginx被動健康檢查的缺點:

  1. nginx只有被訪問時,才會發(fā)起對后端節(jié)點探測。如果本次請求中,節(jié)點正好出現(xiàn)故障,nginx依然會將請求轉(zhuǎn)交給故障的節(jié)點,然后再轉(zhuǎn)交給健康的節(jié)點處理。所以不會影響到這次請求的正常進行。由于多了一次轉(zhuǎn)發(fā),會影響效率。
  2. 無法做到預(yù)警。

nginx主動健康檢查

  1. 淘寶開發(fā)的tengine自帶心跳檢測模塊,若健康檢查包類型為http,在開啟健康檢查功能后,nginx會根據(jù)設(shè)置的間隔向后端服務(wù)器端口發(fā)送健康檢查包,并根據(jù)期望的HTTP狀態(tài)碼來判斷服務(wù)是否健康。后端節(jié)點不可用,則請求不會轉(zhuǎn)發(fā)到故障節(jié)點。
  2. 故障節(jié)點恢復(fù)后,請求正常轉(zhuǎn)發(fā)

????????nginx_upstream_check_module是一個專門提供負(fù)載均衡器內(nèi)節(jié)點的健康檢查的,這個是淘寶技術(shù)團隊開發(fā)的 nginx 模塊 ,通過它可以用來檢測后端 realserver 的健康狀態(tài)。如果后端 realserver 不可用,則所以的請求就不會轉(zhuǎn)發(fā)到該節(jié)點上。

????????淘寶的 tengine 自帶了該模塊,官方地址:http://tengine.taobao.org。如果是 nginx,可以通過補丁的方式來添加該模塊到 nginx 中(https://github.com/yaoweibin/nginx_upstream_check_module)。

2、安裝配置

2.1 下載nginx 和?nginx_upstream_check_module

# cd /usr/local/src
# wget https://nginx.org/download/nginx-1.20.2.tar.gz
# tar zxf nginx-1.20.2.tar.gz
# git clone https://github.com/yaoweibin/nginx_upstream_check_module.git
# ls -l
total 1044
drwxr-xr-x 8 1001 1001     158 Nov 16  2021 nginx-1.20.2
-rw-r--r-- 1 root root 1062124 Nov 16  2021 nginx-1.20.2.tar.gz
drwxr-xr-x 7 root root    4096 Jul 20 23:50 nginx_upstream_check_module

2.2 為nginx打補丁并編譯安裝

# cd nginx-1.20.2
# patch -p1 < /usr/local/src/nginx_upstream_check_module/check_1.20.1+.patch
patching file src/http/modules/ngx_http_upstream_hash_module.c
patching file src/http/modules/ngx_http_upstream_ip_hash_module.c
patching file src/http/modules/ngx_http_upstream_least_conn_module.c
patching file src/http/ngx_http_upstream_round_robin.c
patching file src/http/ngx_http_upstream_round_robin.h# ./configure --prefix=/usr/local/nginx --user=nginx --group=nginx --with-compat --with-file-aio --with-threads --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_flv_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_mp4_module --with-http_random_index_module --with-http_realip_module --with-http_secure_link_module --with-http_slice_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-mail --with-mail_ssl_module --with-stream --with-stream_realip_module --with-stream_geoip_module --with-stream_ssl_module --with-stream_ssl_preread_module --with-pcre --with-pcre-jit --with-stream_geoip_module --add-module=/usr/local/src/nginx_upstream_check_module
# make && make install

2.3 配置案例及效果

# cat conf/conf.d/nginx_upstream_check.conf
upstream cluster{server 192.168.100.210:9091;server 192.168.100.210:9092;check interval=3000 rise=2 fall=2 timeout=3000 type=http;check_http_send "GET /ops/v1/check HTTP/1.0\r\n\r\n ";check_http_expect_alive http_2xx http_3xx;
}server {listen       8888;server_name  localhost;#charset koi8-r;access_log  logs/nginx_upstream_check.log  main;location / {root   html;index  index.html;}location ^~ /nginxServer/ {proxy_pass http://cluster/;proxy_set_header Host qyapi.weixin.qq.com;proxy_set_header X-Forwarded-Proto https;proxy_set_header X-Real-IP $remote_addr;proxy_set_header REMOTE-HOST $remote_addr;proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;proxy_pass_request_body on;proxy_set_header   Cookie $http_cookie;real_ip_header X-Real-IP;}location /nginx_status {check_status;access_log off;}
}

2.4 語法及指令介紹

check interval=milliseconds [fall=count] [rise=count] [timeout=milliseconds] [default_down=true|false] [type=tcp|http|ssl_hello|mysql|ajp] [port=check_port]
  1. interval: 向后端發(fā)送的健康檢查包的間隔,單位為毫秒
  2. rise: 如果連續(xù)成功次數(shù)達(dá)到rise_count,服務(wù)器就被認(rèn)為是up
  3. fall: 如果連續(xù)失敗次數(shù)達(dá)到fall_count,服務(wù)器就被認(rèn)為是down
  4. timeout: 后端健康請求的超時時間,單位為毫秒
  5. type: 健康檢查包的類型,支持類型如下:
    1. tcp:簡單的tcp連接,如果連接成功,就說明后端正常
    2. ssl_hello:發(fā)送一個初始的SSL hello包并接受服務(wù)器的SSL hello包
    3. http:發(fā)送HTTP請求,通過后端的回復(fù)包的狀態(tài)來判斷后端是否存活
    4. mysql: 向mysql服務(wù)器連接,通過接收服務(wù)器的greeting包來判斷后端是否存活
    5. ajp:向后端發(fā)送AJP協(xié)議的Cping包,通過接收Cpong包來判斷后端是否存活
  6. default_down: 設(shè)定初始時服務(wù)器的狀態(tài),如果是true,就說明默認(rèn)是down的,如果是false,就是up的。默認(rèn)值是true,也就是一開始服務(wù)器認(rèn)為是不可用,要等健康檢查包達(dá)到一定成功次數(shù)以后才會被認(rèn)為是健康的
  7. port: 指定后端服務(wù)器的檢查端口。你可以指定不同于真實服務(wù)的后端服務(wù)器的端口,比如后端提供的是443端口的應(yīng)用,你可以去檢查80端口的狀態(tài)來判斷后端健康狀況。默認(rèn)是0,表示跟后端server提供真實服務(wù)的端口一樣

2.5?check_http_send功能

用法:check_http_send "GET /?HTTP/1.0\r\n\r\n"
默認(rèn)值: "GET / HTTP/1.0\r\n\r\n"
位置:upstream塊
說明:http://ip:port/做健康檢測

2.6 監(jiān)控

    You can specify the default display format. The formats can be `html`,`csv` or `json`. The default type is `html`. It also supports to specifythe format by the request argument. Suppose your `check_status` locationis '/status', the argument of `format` can change the display page'sformat. You can do like this:/status?format=html/status?format=csv/status?format=jsonAt present, you can fetch the list of servers with the same status bythe argument of `status`. For example:/status?format=html&status=down/status?format=csv&status=up
http://www.risenshineclean.com/news/3713.html

相關(guān)文章:

  • sketch做網(wǎng)站怎么建網(wǎng)站賣東西
  • 鄒城網(wǎng)站建設(shè)哪家便宜產(chǎn)品推廣營銷方案
  • 專業(yè)的設(shè)計網(wǎng)站營銷軟文的范文
  • 個人博客網(wǎng)站模板源碼廣州seo推廣服務(wù)
  • 手機網(wǎng)站開發(fā)蘋果5 鍵盤彈出遮擋網(wǎng)絡(luò)運營好學(xué)嗎
  • 門戶網(wǎng)站建設(shè)相關(guān)需求百度聯(lián)盟怎么賺錢
  • 做農(nóng)產(chǎn)品網(wǎng)站需要做的準(zhǔn)備谷歌app官方下載
  • http:設(shè)計家園.comwordpress培訓(xùn)考試優(yōu)化技術(shù)
  • wordpress menu插件seo的流程是怎么樣的
  • 新網(wǎng)站建設(shè)咨詢seo網(wǎng)絡(luò)科技有限公司
  • 開封做網(wǎng)站成人技能培訓(xùn)
  • 項城網(wǎng)站設(shè)計焦作seo公司
  • 武漢做企業(yè)網(wǎng)站的公司百度官方免費下載
  • 深圳java網(wǎng)站建設(shè)軟文營銷名詞解釋
  • 長沙做網(wǎng)站哪里好dw網(wǎng)站制作
  • 做模具的都有什么網(wǎng)站營銷技巧和營銷方法心得
  • 濟南 制作網(wǎng)站 公司杭州網(wǎng)站建設(shè)網(wǎng)頁制作
  • 帝國cms做新聞網(wǎng)站順德搜索seo網(wǎng)絡(luò)推廣
  • 網(wǎng)站制作和美工提高搜索引擎排名
  • 沒有網(wǎng)站可以做搜索引擎營銷嗎業(yè)務(wù)推廣方案怎么寫
  • 建設(shè)教育網(wǎng)站整合營銷方案怎么寫
  • 飛飛cms悠悠電影網(wǎng)站知乎怎么申請關(guān)鍵詞推廣
  • 自己做直播網(wǎng)站百度網(wǎng)址大全網(wǎng)址導(dǎo)航
  • 營銷網(wǎng)站建設(shè)新聞?wù)撐氖珍浘W(wǎng)站有哪些
  • 合肥做網(wǎng)站的公司關(guān)鍵詞優(yōu)化排名詳細(xì)步驟
  • 網(wǎng)站建設(shè)方案服務(wù)器惠州網(wǎng)站關(guān)鍵詞排名
  • 開個網(wǎng)站需要什么條件html靜態(tài)網(wǎng)頁制作
  • 網(wǎng)站建設(shè)竣工驗收報告深圳網(wǎng)絡(luò)公司推廣
  • 影視 網(wǎng)站建設(shè) 新媒體百度云盤網(wǎng)頁版
  • 做文獻(xiàn)綜述用什么網(wǎng)站長沙seo行者seo09