avro-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yang <teddyyyy...@gmail.com>
Subject thread pool for Socket server?
Date Wed, 08 Jun 2011 01:58:46 GMT
currently SocketServer basically does this:

      while (true) {
          new Connection(channel.accept());


so it faithfully accepts any incoming connection and creates a worker thread
processing the request.

I think this is prone to DOS attacks, or ungraceful failure in the case of
heavy traffic.

if we use a limited thread pool inside Connection() implementation, we can
reject connections if we are too heavily loaded.

thought it's basically a trivial thing to implement, but considering this is
a very common use case, is it worthwhile to put
such an implementation into the avro source?


View raw message