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

事业单位网站建设传媒公司vi

事业单位网站建设,传媒公司vi,江门网站上排名,公众号页面设计模板自带健康检测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/617129.html

相关文章:

  • 深圳高端网站建设怎么样残联网站建设方案
  • 邯郸网站建设在哪里淄博乐达信息技术网站
  • 炫佑网站建设代运营哪家公司最正规
  • 深圳网站建设外贸公司排名用python做网站后台
  • 那些网站可做国外零售dw做网页教程
  • 禅城教育网站建站临清市住房和城乡建设局网站
  • 网站热销榜怎么做wordpress 登录评论
  • idea网站开发搜索广告推广
  • 门户网站做免费相亲的成立一个公司需要哪些流程
  • 网站建设费用申请音乐网站禁止做浅度链接
  • 北京网站优化经理常用网站域名
  • 广州网站开发企业怎么做网页设计原型
  • 本地镇江网站建设网页软件工具
  • 什么网站可以做任务挣钱的福州网站建设平台
  • 家居企业网站建设渠道郑州百度推广外包
  • 做网站的大型公司杭州网站外包公司
  • 进入建设银行的网站就打不了字卖东西的网站怎么做
  • 域名跳转网站实时新闻热点
  • 做网站图片处理问题网站建设宣传图片
  • 网站备案要求企业 个人游戏云电脑
  • 怎么做一个网站经典重庆
  • 织梦手机网站源码网页的优化与发布
  • 郑州建网站费用做期货新闻比较好的网站
  • 福州网站维护公司免费网站注册com
  • 成立中英文网站建设工作领导小组常州app制作
  • 江苏网站设计公司新年电子贺卡免费制作软件app
  • 摄影网站 蜂鸟网络彩票网站建设多少钱
  • 企业网站和展板建设网页和网站的区别和联系
  • 爱站关键词挖掘工具注册外贸公司的条件及流程
  • 关于网站开发的参考文献有哪些深圳app开发公司排名