I use Finalge https://twitter.github.io/finagle/
to test the timeout case like this:
- Server side: in the RPC definition, Just sleep 10 secs and return.
- Client side: call RPC function using
within
likewithin(50.milliseconds) onSuccess { ... } onFailure { ... }
- Many clients: use about 100 clients to call the RPC function at the same time
The result is that all the RPCs are timeout of course. But, when I use netstat
to check the connection I find that there are 100 ESTABLISHED
connection. The question is can I limit the connections number Finagle create ?