Hi, Can someone please help me understand the following thing: 1) what is difference between selector threads and worker threads. How can I limit client not to flood server with lots of requests?
2) I am using TThreadedSelectorServer with (selector 4 and workers = 10) When a client sends 20 concurrent requests then first 10 responses takes almost the same time as time spent on server side. However the rest of the 10 threads (11..20)take lot more. If I increase the worker threads on server side to 50 - and client sends 100 requests then again same behavior. First 50 takes same amount of time as serverside and next 50 takes take lot more time but on server side inside the handler its similar for all 100 threads. Why on client side 51..100 threads response takes so much time? are these threads waiting on server side to get their chance to run? If so how can I set a limit that beyond some number we will not accept connections on server side? I tried with acceptQueueSizePerThread, and args.acceptPolicy(AcceptPolicy.FAIR_ACCEPT); but on client side I don't see any exceptions. Is this right thing to do? thanks a lot, -raj.
