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


##########
services/src/main/java/org/apache/druid/cli/CliOverlord.java:
##########
@@ -542,4 +570,27 @@ public void initialize(Server server, Injector injector)
       server.setHandler(handlerList);
     }
   }
+
+  protected static boolean addQOSFiltering(ServletContextHandler root, int 
threadsForOvelordWork)
+  {
+    if (threadsForOvelordWork >= ServerConfig.DEFAULT_NUM_PACKING_THREADS) {
+      log.info("Enabling QOS filter on overlord requests with limit [%d].", 
threadsForOvelordWork);
+      JettyBindings.QosFilterHolder filterHolder = new 
JettyBindings.QosFilterHolder(
+          new String[]{
+              "/druid-internal/v1/*",
+              "/druid/indexer/v1/*"
+          },
+          threadsForOvelordWork
+      );
+      JettyServerInitUtils.addFilters(root, 
Collections.singleton(filterHolder));
+      return true;
+    } else {
+      log.info(
+          "QOS filter is disabled for the overlord requests." +
+          "Set `druid.server.http.numThread` to a value greater than %d to 
enable QoSFilter.",
+          ServerConfig.DEFAULT_NUM_PACKING_THREADS

Review Comment:
   Thanks for the catch. 



-- 
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