View Nginx enabled those modules:
#./nginx-Vtengine Version:tengine/2.1.1(nginx/1.6.2) built by GCC4.4.7 20120313(Red Hat4.4.7- One) (GCC) TLS SNI support enabledconfigure arguments:--prefix=/apps/tengine-2.1.1Loaded Modules:ngx_core_module (Static) Ngx_errlog_module (Static) Ngx_conf_module (Static) Ngx_dso_module (Static) Ngx_syslog_module (Static) Ngx_events_module (Static) Ngx_event_core_module (Static) Ngx_epoll_module (Static) Ngx_procs_module (Static) Ngx_proc_core_module (Static) Ngx_openssl_module (Static) Ngx_regex_module (Static) Ngx_http_module (Static) Ngx_http_core_module (Static) Ngx_http_log_module (Static) Ngx_http_upstream_module (Static) Ngx_http_static_module (Static) Ngx_http_autoindex_module (Static) Ngx_http_index_module (Static) Ngx_http_auth_basic_module (Static) Ngx_http_access_module (Static) Ngx_http_limit_conn_module (Static) Ngx_http_limit_req_module (Static) Ngx_http_geo_module (Static) Ngx_http_map_module (Static) Ngx_http_split_clients_module (Static) Ngx_http_referer_module (Static) Ngx_http_rewrite_module (Static) Ngx_http_ssl_module (Static) Ngx_http_proxy_module (Static) Ngx_http_fastcgi_module (Static) Ngx_http_uwsgi_module (Static) Ngx_http_scgi_module (Static) Ngx_http_memcached_module (Static) Ngx_http_empty_gif_module (Static) Ngx_http_browser_module (Static) Ngx_http_user_agent_module (Static) Ngx_http_upstream_ip_hash_module (Static) Ngx_http_upstream_consistent_hash_module (Static) Ngx_http_upstream_check_module (Static) #nginx的健康检查模块安装了 Ngx_http_upstream_least_conn_module (Static) Ngx_http_reqstat_module (Static) Ngx_http_upstream_keepalive_module (Static) Ngx_http_upstream_dynamic_module (Static) Ngx_http_stub_status_module (Static) Ngx_http_write_filter_module (Static) Ngx_http_header_filter_module (Static) Ngx_http_chunked_filter_module (Static) Ngx_http_range_header_filter_module (Static) Ngx_http_gzip_filter_module (Static) Ngx_http_postpone_filter_module (Static) Ngx_http_ssi_filter_module (Static) Ngx_http_charset_filter_module (Static) Ngx_http_userid_filter_module (Static) Ngx_http_footer_filter_module (Static) Ngx_http_trim_filter_module (Static) Ngx_http_headers_filter_module (Static) Ngx_http_upstream_session_sticky_module (Static) Ngx_http_copy_filter_module (Static) Ngx_http_range_body_filter_module (Static) Ngx_http_not_modified_filter_module (Static)
Add a health check to the upstream added in the nginx.conf configuration file as follows:
uptream Name { 192.168. 0.21: 192.168. 0.22: Check interval= rise=2 fall=5 timeout= + type=http; } #上面配置的意思是, for the name of all nodes in this load balancer entry, each 3 second detection of a capital, request 2 under the normal flag realserver state is up, if the detection of 5 failed, then the status of the Mark Realserver is down, the timeout is 1 seconds.
Upstream health Check in nginx.conf config file