Loading...
nginx转发请求到后台时,并发的情况下会出现nginx只用了很低的cpu转发了很少的请求到后端,应该是因为用了短连接导致大量端口被占用,所以需要改成长链接去转发。upstream face_background { server 127.0.0.1:8090 max_fails=5 fail_timeout=5s; keepal...
当高并发情况下,对某一个表的同一条数据进行更新操作时,如果每次都是更新同一个数据的话会性能比较低下,大概并发只能到300-400之间,所以需要对数据叠加定时进行更新操作,golang可以使用时间轮进行定时获取redis里存储的数据,然后定时将数据更新到表中,虽然redis是单线程的,但是高并发情况下,不要直接使用set和del等操作,这样会导致有些统计的数据丢失,进行使用inc等方法操作,这...
nginx配置 location @java { header_filter_by_lua_file /www/server/nginx/lua/handle_cors.lua; if ($request_method = 'OPTIONS') { return...
location /blank/{ add_header Cache-Control "no-store, no-cache"; proxy_pass http://10.68.50.74:80/; } location ^~ /blank/css/ { expires 168h; add_header Pragma p...
grafana模板号:13659。下载地址 https://grafana.com/grafana/dashboards/13659-blackbox-exporter-http-prober/ 安装插件,重启grafana生效。grafana-cli plugins install grafana-piechart-panelruler - alert: curlHttpStatus ...