exceptionfactory commented on a change in pull request #4847:
URL: https://github.com/apache/nifi/pull/4847#discussion_r583916702
##########
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:
Thanks for providing that background @pgyori, the lower boundary makes
sense given the behavior of `QueuedThreadPool`. Having `1000` as the upper
boundary sounds like a reasonable limit since more is not always better when it
comes to threads. With that explanation and the unit tests, the PR looks good!
----------------------------------------------------------------
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]