pgyori commented on a change in pull request #4847:
URL: https://github.com/apache/nifi/pull/4847#discussion_r583911727



##########
File path: 
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ListenHTTP.java
##########
@@ -226,6 +226,20 @@ public AllowableValue getAllowableValue() {
             .defaultValue(ClientAuthentication.AUTO.name())
             .dependsOn(SSL_CONTEXT_SERVICE)
             .build();
+    public static final PropertyDescriptor MAX_THREAD_POOL_SIZE = new 
PropertyDescriptor.Builder()
+            .name("max-thread-pool-size")
+            .displayName("Maximum Thread Pool Size")
+            .description("The maximum number of threads to be used by the 
embedded Jetty server. "
+                    + "The value can be set between 8 and 1000. "
+                    + "The value of this property affects the performance of 
the flows and the operating system, therefore "
+                    + "the default value should only be changed in justified 
cases. "
+                    + "A value that is less than the default value may be 
suitable "
+                    + "if only a small number of HTTP clients connect to the 
server. A greater value may be suitable "
+                    + "if a large number of HTTP clients are expected to make 
requests to the server simultaneously.")
+            .required(true)
+            .addValidator(StandardValidators.createLongValidator(8L, 1000L, 
true))

Review comment:
       Yes, a minimum value of 1 is supported. However, the relevant 
constructor of QueuedThreadPool uses the minimum value of 8 hard coded if the 
max value is greater than 8. Based on that, I do not think it is advised to set 
a very low number of threads, to  avoid performance issues with the Processor. 
Also, there is no limit for the max value (except for what an integer can 
hold), but we want to avoid abuse of this setting because it may lead to 
performance issues on the entire system NiFi is running on. Although the upper 
limit I wrote there is up for discussion.




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

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


Reply via email to