Siv Ragav
Siv Ragav

Reputation: 395

Requests taking longer time in Netty server under high load

We have built a real time system using Netty framework for handling our HTTP requests. 20 % of the calls made to the service are long poll in nature, where we reply after 55 seconds in most of the cases.

As the load increases, response time gradually increases and Under high load conditions (20000 long poll connections and 10000 short poll connections established), the response time goes above 5 sec.

We confirmed that the requests are delayed at netty server level. All the other factors (Client, Nginx, Server business logic) are verified to be a non-issue. We even tried running our tests with our business logic completely removed. Still the results were same.

Can somebody throw some light on how to tune Netty to handle such loads.

Shiva.

Upvotes: 1

Views: 1651

Answers (1)

Martin
Martin

Reputation: 677

It sounds like you may have not yet put the handling of this 20% of requests behind an ExecutionHandler at your pipelines. If that's the case then your worker threads are stuck waiting and can not handle new requests. Although you could make sure that those requests that can be processed immediately are handled before that ExecutionHandler.

org.jboss.netty.handler.execution.ExecutionHandler

Upvotes: 1

Related Questions