简体   繁体   中英

How can I test client pipelining in java?

Can anyone suggest a simple setup of a servlet in java that supports pipelining?

(It is for unit testing, so simplicity is better than scaleability).

The server side request queue is provided by application container and not by servlet itself.

In case of Tomcat the component responsible for that is called Connector which can be configured (server.xml) in terms of the number of threads that serve incoming requests, timeout that request can stay unprocessed in the queue, the size of the queue, etc.

Have a look at Tomcat Connector documentation , I believe the most important would be 'acceptCount', 'maxThreads', 'connectionTimeout', 'maxKeepAliveRequests' (if you require http keepAlive ).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM