当前位置: 首页 > news >正文

事业单位网站建设辽宁响应式网站建设价格

事业单位网站建设,辽宁响应式网站建设价格,北京专业企业网站建设,招聘网站内容建设自带健康检测module nginx本身提供有健康检测module ngx_http_upstream_module ,利用自身的module可以实现简单的健康检测 下载nginx模块 wget https://github.com/nginx/nginx/archive/release-1.19.3.tar.gz解压nginx模块 tar -zxvf release-1.19.3.tar.gz进入nginx模块目录…

自带健康检测module

nginx本身提供有健康检测module ngx_http_upstream_module ,利用自身的module可以实现简单的健康检测

下载nginx模块
wget https://github.com/nginx/nginx/archive/release-1.19.3.tar.gz解压nginx模块
tar -zxvf release-1.19.3.tar.gz进入nginx模块目录
cd nginx-release-1.19.3编译nginx带上ngx_http_upstream_module模块
./configure --add-module=../ngx_http_upstream_module安装nginx
make && make install重启nginx
nginx -s reload

第三方健康检测module

第三方插件的module,例如openresty的lua-resty-upstream-healthcheck

http {lua_package_path "/path/to/lua-resty-upstream-healthcheck/lib/?.lua;;";# sample upstream block:upstream foo.com {server 127.0.0.1:12354;server 127.0.0.1:12355;server 127.0.0.1:12356 backup;}# the size depends on the number of servers in upstream {}:lua_shared_dict healthcheck 1m;lua_socket_log_errors off;init_worker_by_lua_block {local hc = require "resty.upstream.healthcheck"local ok, err = hc.spawn_checker{shm = "healthcheck",  -- defined by "lua_shared_dict"upstream = "foo.com", -- defined by "upstream"type = "http", -- support "http" and "https"http_req = "GET /status HTTP/1.0\r\nHost: foo.com\r\n\r\n",-- raw HTTP request for checkingport = nil,  -- the check port, it can be different than the original backend server port, default means the same as the original backend serverinterval = 2000,  -- run the check cycle every 2 sectimeout = 1000,   -- 1 sec is the timeout for network operationsfall = 3,  -- # of successive failures before turning a peer downrise = 2,  -- # of successive successes before turning a peer upvalid_statuses = {200, 302},  -- a list valid HTTP status codeconcurrency = 10,  -- concurrency level for test requests-- ssl_verify = true, -- https type only, verify ssl certificate or not, default true-- host = foo.com, -- https type only, host name in ssl handshake, default nil}if not ok thenngx.log(ngx.ERR, "failed to spawn health checker: ", err)returnend-- Just call hc.spawn_checker() for more times here if you have-- more upstream groups to monitor. One call for one upstream group.-- They can all share the same shm zone without conflicts but they-- need a bigger shm zone for obvious reasons.}server {...# status page for all the peers:location = /status {access_log off;allow 127.0.0.1;deny all;default_type text/plain;content_by_lua_block {local hc = require "resty.upstream.healthcheck"ngx.say("Nginx Worker PID: ", ngx.worker.pid())ngx.print(hc.status_page())}}# status page for all the peers (prometheus format):location = /metrics {access_log off;default_type text/plain;content_by_lua_block {local hc = require "resty.upstream.healthcheck"st , err = hc.prometheus_status_page()if not st thenngx.say(err)returnendngx.print(st)}}}
}
http://www.dtcms.com/a/580565.html

相关文章:

  • 设置网站字体专门做美食的网站
  • 国外做螺栓比较好的网站个人网站有哪些举例
  • seo需求兰州快速seo整站优化招商
  • 长春自助建站模板天猫网页版
  • 白云网站建设哪家好网页制作教程网站
  • 做网站的服务器多少钱网络推广目标计划
  • 企业网站建设个人博客郑州app软件开发公司
  • 手游传奇网站发布北京seo加盟
  • 坂田杨美企业网站建设广州网站建设丿新科送推广
  • 网站集群 建设方案室内设计联盟 官网
  • 功能网站建设多少钱做静态网站选用什么服务器
  • 六安市公司网站建设有什么好的网站
  • 手机网站 pc网站模板做网站一单能挣多少
  • 电影网站建设的意义flash+xml地图网站
  • 郑州门户网站制作php电商网站开发流程图
  • 一个网站有哪几种漏洞好看的企业官网
  • 时代汇创网站建设公司陕西网络推广公司
  • app 网站开发公司电话上海未成年人思想道德建设网站
  • 网站的服务器是什么ios移动网站开发工具
  • 网站建设网店名字wordpress 仿雷锋网
  • 如何做网站轮播大图昆明 网站设计
  • 网站查询访问wordpress 评论显示ip
  • 小说主角重生之后做网站wordpress全站音乐
  • 网站开发多少钱农民天津网络优化网站建设
  • 合肥市建设厅网站湖南招聘网
  • 网站收录提交入口大全江苏网站设计
  • 岳阳市住房和城乡建设路网站手机html编程软件app
  • 做网站ui去哪儿接私活西部数据网站建设
  • 织梦怎么做的网站东营最新通知
  • 网站开发使用哪种工具好自己做一个网站需要什么