This is an automated email from the ASF dual-hosted git repository.

rawlin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git


The following commit(s) were added to refs/heads/master by this push:
     new 0b26836  Adding a maxConnections value to TR (#6515)
0b26836 is described below

commit 0b26836a5f8f410bfa4f2599fbe290a88dfa173f
Author: Srijeet Chatterjee <[email protected]>
AuthorDate: Wed Jan 19 15:03:35 2022 -0700

    Adding a maxConnections value to TR (#6515)
    
    * adding a maxConnections value to TR
    
    * adding changelog
---
 CHANGELOG.md                                                  | 1 +
 infrastructure/ansible/roles/traffic-router/defaults/main.yml | 4 ++++
 traffic_router/core/src/main/conf/server.xml                  | 2 +-
 3 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 76e5a93..057c161 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -49,6 +49,7 @@ The format is based on [Keep a 
Changelog](http://keepachangelog.com/en/1.0.0/).
 - [#6179](https://github.com/apache/trafficcontrol/issues/6179) Updated the 
Traffic Ops rpm to include the `ToDnssecRefresh` binary and make the 
`trafops_dnssec_refresh` cron job use it
 - Traffic Portal no longer uses `ruby compass` to compile sass and now uses 
`dart-sass`.
 - Changed Invalidation Jobs throughout (TO, TP, T3C, etc.) to account for the 
ability to do both REFRESH and REFETCH requests for resources.
+- Changed the `maxConnections` value on Traffic Router, to prevent the 
thundering herd problem (TR).
 - The `admin` Role is now always guaranteed to exist, and can't be deleted or 
modified.
 - [#6376](https://github.com/apache/trafficcontrol/issues/6376) Updated TO/TM 
so that TM doesn't overwrite monitoring snapshot data with CR config snapshot 
data.
 - Updated `t3c-apply` to reduce mutable state in `TrafficOpsReq` struct.
diff --git a/infrastructure/ansible/roles/traffic-router/defaults/main.yml 
b/infrastructure/ansible/roles/traffic-router/defaults/main.yml
index 8f8a9f7..b88b8f2 100644
--- a/infrastructure/ansible/roles/traffic-router/defaults/main.yml
+++ b/infrastructure/ansible/roles/traffic-router/defaults/main.yml
@@ -66,6 +66,9 @@ tr_java_opts:
   - "-Djava.security.egd=file:/dev/./urandom"
 
 # server.xml
+tr_connector_opts:
+  maxConnections: 4000
+
 tr_connector_default:
   protocol: 
'org.apache.traffic_control.traffic_router.protocol.LanguidNioProtocol'
   maxThreads: 10000
@@ -92,6 +95,7 @@ tr_connectors:
     portAttribute: 'ApiPort'
   - port: 443
     protocol: "{{tr_connector_default.protocol}}"
+    maxConnections: "{{tr_connector_opts.maxConnections}}"
     maxThreads: "{{tr_connector_default.maxThreads}}"
     connectionTimeout: "{{tr_connector_default.connectionTimeout}}"
     mbeanPath: "{{tr_connector_default.mbeanPath}}"
diff --git a/traffic_router/core/src/main/conf/server.xml 
b/traffic_router/core/src/main/conf/server.xml
index 9635a31..8f09983 100644
--- a/traffic_router/core/src/main/conf/server.xml
+++ b/traffic_router/core/src/main/conf/server.xml
@@ -43,7 +43,7 @@
                                   scheme="https" secure="true" 
SSLEnabled="true" clientAuth="false" sslProtocol="TLS" 
protocols="+TLSv1.1,+TLSv1.2,+TLSv1.3" connectionTimeout="10000"
                                   mbeanPath="traffic-router:name=languidState" 
readyAttribute="Ready" portAttribute="SecureApiPort" sendReasonPhrase="true"
                                   
sslImplementationName="org.apache.traffic_control.traffic_router.protocol.RouterSslImplementation">
 </Connector>
-               <Connector port="443" 
protocol="org.apache.traffic_control.traffic_router.protocol.LanguidNioProtocol"
 maxThreads="10000"
+               <Connector port="443" 
protocol="org.apache.traffic_control.traffic_router.protocol.LanguidNioProtocol"
 maxConnections="4000" maxThreads="10000"
                                   scheme="https" secure="true" 
SSLEnabled="true" clientAuth="false" sslProtocol="TLS" 
protocols="+TLSv1.1,+TLSv1.2,+TLSv1.3" connectionTimeout="10000"
                                   mbeanPath="traffic-router:name=languidState" 
readyAttribute="Ready" portAttribute="SecurePort" sendReasonPhrase="true"
                                   
sslImplementationName="org.apache.traffic_control.traffic_router.protocol.RouterSslImplementation">

Reply via email to