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

网站怎么做扫码微信支付接口网站与经营网站

网站怎么做扫码微信支付接口,网站与经营网站,青岛网站推广优化公司,芒市网站建设公司概述#xff1a;web软件项目工程实施过程#xff0c;经常会用到客户端和服务端建立 KeepAlive 长连接来提高应用效率的场景。例如#xff1a;移动端应用或者复杂的网页交互需要在用户浏览时频繁地向服务端发送请求。但是随之而来的问题是#xff0c;需要对服务器端 tomcat …概述web软件项目工程实施过程经常会用到客户端和服务端建立 KeepAlive 长连接来提高应用效率的场景。例如移动端应用或者复杂的网页交互需要在用户浏览时频繁地向服务端发送请求。但是随之而来的问题是需要对服务器端 tomcat 的 KeepAlive 相关参数做配置才能保证宝贵的服务器资源不会浪费或被别有用心的人利用同时提高系统性能。 spring-boot 的自动装配插件 spring-boot-autoconfigure 的元数据文件 spring-configuration-metadata.json 中已经内嵌了一些默认的 tomcat 配置 默认情况下 连接数超过 10000 后会出现拒绝连接的情况。 触发的客户端请求超过 300 后拒绝响应。 {sourceType: org.springframework.boot.autoconfigure.web.ServerProperties$Tomcat,defaultValue: 100,name: server.tomcat.accept-count,description: Maximum queue length for incoming connection requests when all possible request processing threads are in use.,type: java.lang.Integer}, ...{sourceType: org.springframework.boot.autoconfigure.web.ServerProperties$Tomcat,defaultValue: 10000,name: server.tomcat.max-connections,description: Maximum number of connections that the server accepts and processes at any given time. Once the limit has been reached, the operating system may still accept connections based on the \acceptCount\ property.,type: java.lang.Integer}, ... {sourceType: org.springframework.boot.autoconfigure.web.ServerProperties$Tomcat,defaultValue: 200,name: server.tomcat.max-threads,description: Maximum number of worker threads.,type: java.lang.Integer}, ... {sourceType: org.springframework.boot.autoconfigure.web.ServerProperties$Tomcat,defaultValue: 10,name: server.tomcat.min-spare-threads,description: Minimum number of worker threads.,type: java.lang.Integer},但是与 KeepAlive 相关的内嵌 tomcat 配置属性需要定制化开发 // bean被加载后 作用相当于Spring容器内的TomcatEmbeddedServletContainerFactory Component public class WebServerConfiguration implements WebServerFactoryCustomizerConfigurableWebServerFactory {Overridepublic void customize(ConfigurableWebServerFactory configurableWebServerFactory) {// spring装配工厂类提供了自定义tomcat连接器配置的接口((TomcatServletWebServerFactory)configurableWebServerFactory).addConnectorCustomizers(new TomcatConnectorCustomizer() {Overridepublic void customize(Connector connector) {Http11NioProtocol protocol (Http11NioProtocol) connector.getProtocolHandler();// 30秒内没有请求 服务端自动断开 KeepAlive 链接protocol.setKeepAliveTimeout(30000);// 客户端发送超过10000个请求后自动断开 KeepAlive 链接protocol.setMaxKeepAliveRequests(10000);}});} }
http://www.dnsts.com.cn/news/251604.html

相关文章:

  • 湖北建站公司用php做的网站怎么上传
  • 广州网站开发企业手机网站外链怎么
  • 如何进行电子商务网站推广做网站的公司怎么找客户
  • 网站标题符号用老域名重新做个网站
  • 广州最好网站建设公司如何提升网站的权重
  • 广东省建设八大员网站郑州网站优化技巧
  • 建立一个网站需要多少钱费用佛山提供网站设计报价
  • 做家装施工的网站网站及搜索引擎优化建议
  • 学做甜品的网站linode安装wordpress
  • 购物网站主要的功能模块电子商务网站建设试题及答案
  • 网站开发filter网站 界面
  • 中国空间站实时位置海珠定制型网站建设
  • 外贸网站推广方法之一myfriv wordpress
  • 怎么免费建商城网站吗外贸网站建设服务器
  • 做优化网站注意什么建筑模板算量软件哪个好
  • 手表网站设计免费wordpress 用oss存储
  • 外贸网站策划建工作室网站
  • 微网站菜单大型网站建站公司 上市
  • 阿里云网站建设部署与发布视频做服装要看国外哪些网站
  • 做网站的专业公司wordpress 投稿功能
  • 网站关键词优化网站推广做冒菜店网站
  • 做ppt常用图片网站有哪些太原百度推广排名优化
  • 网站流量如何增加自学装修设计从哪里入手
  • owasp 网站开发制作网站网站
  • 南阳旅游网站建设现状机关单位网站建设申请
  • 郑州网站优化顾问网站建设如何制作教程
  • 服务器 网站建设 过程注册电商平台怎么注册
  • 域名备案 填写网站信息桂林北站到象鼻山多远
  • 西安免费做网站公司西安网站开发外包
  • 互站源码交易平台深圳网站建设制作营销