GET: 请求指定的页面信息,并返回实体主体。
HEAD: 只请求页面的首部。#参考:http://tengine.taobao.org/document_cn/http_upstream_check_cn.html
一、
upstream anubis.web.base_backend { server bj-base-1.jyall.me:9000; server bj-base-2.jyall.me:9000; keepalive 512; check interval=1000 rise=2 fall=2 timeout=3000 type=http; check_http_send "HEAD / HTTP/1.1\r\nConnection: keep-alive\r\n\r\n"; check_http_expect_alive http_2xx http_3xx http_4xx;}
二、
curl -d " server bj-base-1.jyall.me:9000; server bj-base-2.jyall.me:9000; keepalive 512; check interval=1000 fall=3 rise=2 timeout=3000 default_down=false type=http; check_http_send 'GET / HTTP/1.1\r\nConnection: keep-alive\r\nHost: open-anubis.ele.me\r\n\r\n'; #替代的配置check_keepalive_requests 100; check_http_expect_alive http_2xx http_3xx http_4xx;" 127.0.0.1:8866/upstream/open.jyall.me.web.base_backend 返回"success"=>表示ok的
三、
curl 127.0.0.1:8866/up_status4open.jyall.me.web.base_backend
11.200.58.236:9000 up 215515 0 http 0 5 open.jyall.me.web.base_backend 11.200.62.77:9000 up 215283 0 http 0