I am writing a webgame server using netty and intend to use keep-alive to have more performance.
If I use CachedThreadPool for boss and worker executor the server work fine for both keep-alive and non keep-alive connection.
But if I use FixedThreadPool(1) one for boss and one for worker the first respond made it to the client but if browser use that connection to send second request it will blocked out and timeout at server, I close that connection and firefox open new socket, this socket also work fine at first respond.(I already include Connection Keep-alive and ContentLength to the respond header and double check it with httpAnalyzer tool.
So can someone please tell me why this happen and what is the best practice about using thread with netty for an webgame server. if netty is async this shouldn't be happen right ?
0
votes