我希望将ajp连接器的maxThreads增加到500,我注意到它有一个redirect端口8443,所以我应该增加端口8443连接器的maxThreads以及?
<!-- Define a SSL HTTP/1.1 Connector on port 8443 This connector uses the JSSE configuration, when using APR, the connector should be using the OpenSSL style configuration described in the APR documentation --> <!-- <Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true" maxThreads="150" scheme="https" secure="true" clientAuth="false" sslProtocol="TLS" /> --> <!-- Define an AJP 1.3 Connector on port 8009 --> <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" maxThreads="500"/>
在我曾经使用的任何httpd + Tomcat设置中,我们摆脱了任何HTTP连接器,包含AJP连接器回环,并让它运行没有encryption。 目标是让Tomcat执行Java应用程序并让httpd处理所有的HTTP服务。
在AJP连接器的情况下,redirectPort将被使用的唯一方式是如果存在包含具有设置为CONFIDENTIAL的传输保证的用户数据约束的安全约束的web应用程序(web.xml)。
至less在我们的情况下,我们的应用程序很less定义这样的结构。 我们通常通过httpd或负载均衡器来处理安全通信。 由于显示的数据,我们的大多数应用程序总是需要SSL。
更新回应:
这里是一个真正的基准Tomcatconfiguration,稍微调整一下,将连接器的maxThreads增加到500.它仅configuration为在回送(以及closures端口)上监听AJP / 1.3stream量。
<?xml version='1.0' encoding='utf-8'?> <Server port="8005" shutdown="SHUTDOWN"> <Listener className="org.apache.catalina.core.JasperListener" /> <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" /> <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" /> <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" /> <Service name="Catalina"> <Connector port="8009" protocol="AJP/1.3" address="127.0.0.1" enableLookups="false" maxThreads="500" /> <Engine name="Catalina" defaultHost="localhost"> <Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false"> </Host> </Engine> </Service> </Server>
在httpd方面,我们有一个proxy_ajp.conf文件,我们用它专门映射URLpath回Tomcat。 例:
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so ProxyPass /fooAppA/ ajp://localhost:8009/fooAppA/ ProxyPass /fooAppB/ ajp://localhost:8009/fooAppB/ ProxyPassReverse /fooAppA/ ajp://localhost:8009/fooAppA/ ProxyPassReverse /fooAppB/ ajp://localhost:8009/fooAppB/
可以将httpd.confconfiguration为使用(并可以强制使用SSL)。 但是这完全是可选的。