Apache CXF Jetty 配置 httpj:engine-factory ThrottlingFilter 在高负载时返回 HTTP 503
我在 Apache CXF JAX-RS 的 REST 层中对 Jetty 服务器进行了以下配置:
<httpj:engine-factory bus="cxf">
<!--
you just need to specify the TLS Server configuration for the certain port
-->
<httpj:engine port="${port}">
<httpj:tlsServerParameters>
<sec:keyManagers keyPassword="${keystorePassword}">
<sec:keyStore type="JKS"
password="${keystorePassword}"
file="${keystoreFile}"/>
</sec:keyManagers>
<sec:trustManagers>
<sec:keyStore type="JKS"
password="${keystorePassword}"
file="${bookshelf.portal.http.keystoreFile}"/>
</sec:trustManagers>
</httpj:tlsServerParameters>
<httpj:threadingParameters minThreads="5"
maxThreads="15" />
<httpj:sessionSupport>true</httpj:sessionSupport>
</httpj:engine>
</httpj:engine-factory>
我想将 Jetty 配置为使用 ThrottlingFilter 在服务器负载较高时抛出 HTTP 503 错误。
我该怎么做?
I have the following configuration of Jetty server inside my REST layer of Apache CXF JAX-RS:
<httpj:engine-factory bus="cxf">
<!--
you just need to specify the TLS Server configuration for the certain port
-->
<httpj:engine port="${port}">
<httpj:tlsServerParameters>
<sec:keyManagers keyPassword="${keystorePassword}">
<sec:keyStore type="JKS"
password="${keystorePassword}"
file="${keystoreFile}"/>
</sec:keyManagers>
<sec:trustManagers>
<sec:keyStore type="JKS"
password="${keystorePassword}"
file="${bookshelf.portal.http.keystoreFile}"/>
</sec:trustManagers>
</httpj:tlsServerParameters>
<httpj:threadingParameters minThreads="5"
maxThreads="15" />
<httpj:sessionSupport>true</httpj:sessionSupport>
</httpj:engine>
</httpj:engine-factory>
I would like to configure Jetty to use ThrottlingFilter to throw HTTP 503 error upon a high load on server.
How do I do that?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论