You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "awelless (via GitHub)" <gi...@apache.org> on 2025/12/01 08:50:29 UTC

Re: [PR] NIFI-15269 Remove concurrency limit in ConsumeKinesis http client [nifi]

awelless commented on PR #10575:
URL: https://github.com/apache/nifi/pull/10575#issuecomment-3595328035

   @exceptionfactory,
   
   > it sounds like it still influences the maximum number of threads in use for multiple requests, is that correct?
   
   Yes. The concurrency is proportional to the number of actual connections, therefore threads, used under the hood. There is no fixed number on how many requests can go over a single connection, as this is negotiable between a server and a client, but [is recommended](https://www.rfc-editor.org/rfc/rfc9113.html#section-6.5.2-2.6.1) to be no smaller than 100.
   
   I considered using a larger ratio for the concurrency settings, but the problem with dynamically scaling streams doesn’t go away.
   
   Example:
   There is a stream, which has 180 shards. A NiFi user, knowing that there a ratio of 100 between task count and http client concurrency, sets the task count to 2. The processor is working correctly, the data is flowing. Then an AWS administrator, expecting an upcoming spike in the stream usage, increases the number of shards to 250. The client's concurrency isn’t sufficient anymore, errors start occurring and manual intervention is needed. 
   
   I reckon it’s better to keep the processor operational at the expense of creating a bunch of additional http connections than failing the processing and requiring a NiFi user to adjust the task count.
   
   If we want to monitor what http threads were created by the processor, we can provide a custom thread factory to the http client to name the created threads with the processor's name and id. Will it make sense?


-- 
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: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org