Issue with SPDYClient.Factory when creating 1000 concurrent connections
This post has NOT been accepted by the mailing list yet.
I am using SPDY-Client that jetty provides to connect to my SPDY implemented server.
I have integrated the spdy client into a load generation tool. everything works fine when I use 100 concurrent threads to hit 100 RPS to the server.
When I increase the concurrent threads to say 1000, the load generator hangs and I could see that the problem is where it tries to create a new session out of the factory.
My code looks like this
executor = Executors.newFixedThreadPool(20000);
SslContextFactory sslContextFactory = new SslContextFactory();
SPDYClient.Factory factory = new SPDYClient.Factory(executor, null, sslContextFactory,
InetSocketAddress address = new InetSocketAddress(request.baseURL.getHost(),
session = factory.newSPDYClient(SPDY.V3).connect(address,null);
For every thread the above code executes , so when its 1000 threads, it executes for 1000 times concurrently.
I create a new connection for every new thread and the subsequent requests on the thread keeps on creating streams and send data on it to the server.
Is it that the factory is not thread safe ? or am I messing around with any wrong input to the constructor.