首页 > 其他分享 >Jetty的http2模块

Jetty的http2模块

时间:2024-03-10 18:55:05浏览次数:31  
标签:Specifies ## jetty Jetty http2c 模块 http2 默认值

启用http2模块,执行如下命令:

java -jar $JETTY_HOME/start.jar --add-modules=http2

命令的输出,如下:

INFO  : http2           initialized in ${jetty.base}/start.d/http2.ini
INFO  : Base directory was modified

http2模块的配置文件$JETTY_BASE/start.d/http2.ini,内容如下:

# ---------------------------------------
# Module: http2
# Enables the support for the secure HTTP/2 protocol.
# ---------------------------------------
--modules=http2

## Specifies the maximum number of concurrent requests per session.
# jetty.http2.maxConcurrentStreams=128

## Specifies the initial stream receive window (client to server) in bytes.
# jetty.http2.initialStreamRecvWindow=524288

## Specifies the initial session receive window (client to server) in bytes.
# jetty.http2.initialSessionRecvWindow=1048576

## Specifies the maximum number of keys in all SETTINGS frames received by a session.
# jetty.http2.maxSettingsKeys=64

## Specifies the maximum number of bad frames and pings per second,
## after which a session is closed to avoid denial of service attacks.
# jetty.http2.rateControl.maxEventsPerSecond=50

各参数的说明,如下:

  • jetty.http2.maxConcurrentStreams
    单个会话中允许并行的HTTP请求数量的上限值,默认值为128
  • jetty.http2.initialStreamRecvWindow
    流接收数据的窗口的初始容量,单位:字节,默认值为524288
  • jetty.http2.initialSessionRecvWindow
    会话接收数据的窗口的初始容量,单位:字节,默认值为1232896
  • jetty.http2.maxSettingsKeys
    在会话的SETTINGS帧中允许接收的key的数量,默认值为64
  • jetty.http2.rateControl.maxEventsPerSecond
    每秒允许出现的坏帧及ping的数量的上限,超出上限,则判定会话失效,以此来规避潜在的DoS攻击。
    默认值为50

HTTP2要求使用安全通道传输数据,http2c模块基于非安全通道提供HTTP2协议的服务。
启用http2c模块,执行如下命令:

java -jar $JETTY_HOME/start.jar --add-modules=http2c

命令的输出,如下:

INFO  : http2c          initialized in ${jetty.base}/start.d/http2c.ini
INFO  : Base directory was modified

http2c模块的配置文件$JETTY_BASE/start.d/http2c.ini,内容如下:

# ---------------------------------------
# Module: http2c
# Enables the support for the clear-text HTTP/2 protocol.
# ---------------------------------------
--modules=http2c

## Specifies the maximum number of concurrent requests per session.
# jetty.http2c.maxConcurrentStreams=128

## Specifies the initial stream receive window (client to server) in bytes.
# jetty.http2c.initialStreamRecvWindow=524288

## Specifies the initial session receive window (client to server) in bytes.
# jetty.http2c.initialSessionRecvWindow=1232896

## Specifies the maximum number of keys in all SETTINGS frames received by a session.
# jetty.http2c.maxSettingsKeys=64

## Specifies the maximum number of bad frames and pings per second,
## after which a session is closed to avoid denial of service attacks.
# jetty.http2c.rateControl.maxEventsPerSecond=50

各参数的说明,如下:

  • jetty.http2c.maxConcurrentStreams
    单个会话中允许并行的HTTP请求数量的上限值,默认值为128
  • jetty.http2c.initialStreamRecvWindow
    流接收数据的窗口的初始容量,单位:字节,默认值为524288
  • jetty.http2c.initialSessionRecvWindow
    会话接收数据的窗口的初始容量,单位:字节,默认值为1232896
  • jetty.http2c.maxSettingsKeys
    在会话的SETTINGS帧中允许接收的key的数量,默认值为64
  • jetty.http2c.rateControl.maxEventsPerSecond
    每秒允许出现的坏帧及ping的数量的上限,超出上限,则判定会话失效,以此来规避潜在的DoS攻击。
    默认值为50

参考资料

标签:Specifies,##,jetty,Jetty,http2c,模块,http2,默认值
From: https://www.cnblogs.com/jackieathome/p/18064584

相关文章

  • 邮箱发送模块
    注入依赖jdk17springboot3<!--发送电子邮件--><dependency> <groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-mail</artifactId></dependency>application配置server:port:9999#......
  • 要确保请求在一次会话中被转发到相同的后端服务器上,可以使用 Nginx 的 ip_hash 或 sti
    要确保请求在一次会话中被转发到相同的后端服务器上,可以使用Nginx的ip_hash或sticky模块来实现。ip_hash模块:ip_hash 模块使用客户端IP地址作为哈希键,将同一IP地址的请求始终转发到相同的后端服务器。要启用 ip_hash 模块,只需在Nginx配置文件的 http 块或......
  • Tengine 安装 nginx-module-vts 模块
      使用Tengine作为反向代理服务器,发现Tengine日志中接口请求过慢,需要绘制grafana展示详细的接口情况------------------------------------------------------------------------------------------------------------------------------------解决思路#......
  • Jetty的http3模块
    启用http3模块,执行如下命令:java-jar$JETTY_HOME/start.jar--add-modules=http3命令的输出,如下:ALERT:Thereareenabledmodule(s)withlicenses.Thefollowing2module(s):+containssoftwarenotprovidedbytheEclipseFoundation!+containssoftwarenotco......
  • Jetty的server模块
    启用server模块,执行如下命令:java-jar$JETTY_HOME/start.jar--add-modules=server命令的输出,如下:INFO:serverinitializedin${jetty.base}/start.d/server.iniINFO:Basedirectorywasmodified查看server模块的配置文件,执行如下命令:cat$JETTY_BASE/s......
  • Java登陆第三十三天——ES6(二)模块、模块化
    模块化是管理JS代码的一种手段,把代码拆分成小模块,提高代码维护性,复用性,拓展性。模块类似与Java的包,可以从外部导入。模块有三种导出方式分别导出统一导出默认导出三种导出方式可以混用。模块化的关键字有export、import、as和default。ES6的模块会自动开启严格......
  • Jetty的ssl模块
    启用ssl模块,执行如下命令:java-jar$JETTY_HOME/start.jar--add-modules=ssl命令的输出,如下:INFO:sslinitializedin${jetty.base}/start.d/ssl.iniINFO:Basedirectorywasmodified查看ssl模块的配置文件,执行如下命令:cat$JETTY_BASE/start.d/ssl.i......
  • Jetty的bytebufferpool模块
    bytebufferpool模块用于配置Jetty的ByteBuffer对象的对象池。通过对象池的方式来管理ByteBuffer对象的使用和生命周期,期望降低Jetty进程内存的使用,同时降低JVM运行期垃圾回收操作的压力。启用bytebufferpool模块,执行如下命令:java-jar$JETTY_HOME/start.jar--add-modules=byt......
  • Jetty的console-capture模块
    console-capture模块用于记录Jetty运行时向标准输出和标准错误写出的信息。Java的标准输出流,即System.out。Java的标准错误流,即System.err。console-capture模块支持在每天晚上切换输出文件,自动清理超出保留期的日志文件。启用console-capture模块,执行如下命令:java-jar$JET......
  • Ansible——模块
    Ansible介绍Ansible是一个同时管理多个远程主机的软件(任何可以通过SSH协议登录的机器),因此Ansible可以管理远程虚拟机、物理机,也可以是本地主机(linux、windows)。Ansible通过SSH协议实现管理节点、远程节点的通信。只要是能够SSH登录的主机完成的操作,都可以通Ansible自动化操作,比......