I\'m trying to write a simple server with Thrift. At the beginning it looked promising, but I\'ve stumbled into a problem with a number of clients connected at the same time
Taking another approach, if you are using C++ to build your server, you can use TNonblockingServer instead of TThreadPoolServer, which will allow you to accept many connections at once, regardless of how many threads are active, etc...
That being said, you won't necessarily be able to actually do work faster (handlers still execute in a thread pool), but more clients will be able to connect to you at once.
Here's what the code looks like for the NB server:
shared_ptr protocolFactory(new TBinaryProtocolFactory());
shared_ptr handler(new MyHandler());
shared_ptr processor(new MyProcessor(handler));
TNonblockingServer server(processor, protocolFactory, port);