Created 05-30-2018 04:06 PM
My NIFI process flow gets its input from ListenHTTP processor. Potentially thousands of POST requests could be made at the same time. I wonder how many requests ListenHTTP processor can handle at a time.
My next question would be how can I scale up the data injection mechanism (specifically for receiving more POST requests at a time).
Created 05-30-2018 07:51 PM
ListenHTTP creates an embedded Jetty server with a thread pool of 200 threads, so presumably a single ListenHttp could handle whatever you could do with a single Jetty instance with 200 threads.
To scale out you would have a NiFi cluster with a ListenHTTP on each node and a load balancer in front and you'd have your clients POST to the load balancer URL.
Created 06-20-2018 06:00 PM
Actually there is no limit on the Jetty's number of threads and I was able to hit Jetty (NIFI's ListenHTTP processor) with 500 simultaneous requests (tested with JMeter).
Created 05-30-2018 07:57 PM
Thanks for your answer. I wonder how increasing concurrency would play out. If I set ListenHTTP processor's concurrency to 5, would I have 5 instances of jetty and 1000 threads in total?
Created 05-30-2018 08:01 PM
The Jetty server is running separately and creating flow files from the POST requests and then placing the flow files in an internal list/queue, and then when the processor executes it takes a flow file out of the internal queue and transfers it to the success relationship. So the number of concurrent tasks is the number of threads processing the internal queue, but there is only ever one Jetty server per processor.
Created 05-30-2018 08:08 PM
Thank you Bryan.