cryptoe commented on code in PR #19271:
URL: https://github.com/apache/druid/pull/19271#discussion_r3617084070


##########
services/src/main/java/org/apache/druid/cli/CliCoordinator.java:
##########
@@ -229,6 +231,19 @@ public void configure(Binder binder)
             binder.bind(JettyServerInitializer.class)
                   .to(CoordinatorJettyServerInitializer.class);
 
+            // QoS filtering to prevent heavy coordinator API requests from 
starving health check endpoints.
+            // Set druid.coordinator.server.maxConcurrentRequests=-1 to 
disable.
+            final int serverHttpNumThreads = 
ServerConfig.getNumThreadsFromProperties(properties);
+            final int maxConcurrentRequests = 
properties.containsKey("druid.coordinator.server.maxConcurrentRequests")
+                    ? 
Integer.parseInt(properties.getProperty("druid.coordinator.server.maxConcurrentRequests"))
+                    : 
ServerConfig.getDefaultMaxConcurrentRequests(serverHttpNumThreads);
+            if (maxConcurrentRequests > 0) {
+              log.info("Coordinator QoS filtering enabled. Max concurrent 
requests: [%d]", maxConcurrentRequests);
+              JettyBindings.addQosFilter(binder, new 
String[]{"/druid/coordinator/v1/*", "/druid-internal/*"}, 
maxConcurrentRequests);

Review Comment:
   Done both. Added a PathExclusionQOS filter which felt better than adding a 
complicated regex matching. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to