Netty + JMeter, reconnecting errors

I built a simple TCP server using Netty, and I want to compare it with JMeter. I am using JMeter TCP Sampler using the class name BinaryTCPClientImpl to send bytes. I checked "no delay" and "reuse connection". I guess this is for SO_NODELAY and SO_REUSEADDR. I use 75 threads, each of which performs 1000 TCP requests. I constantly see that about 11% of requests fail:

500 java.net.SocketException: software caused a connection interruption: socket write error

If I remove the "reconnect", then all 75,000 requests will succeed without a single error, but the throughput is only 33% of what it was.

Is there something I need to do with my Netty server to prevent these errors?

+5
source share
1 answer

I should note that my server works as follows: accepts the connection, receives some data, sends some data as soon as the data is sent, closes the connection. JMeter docs says that TCP Sampler closes the connection if "socket reuse" is not checked, so I assume this is not SO_REUSEADDR. I assume that in some cases the client sends data, receives the data, and before the server closes the socket, the client tries to send the data again, and then the server closes the socket, and JMeter considers that the request failed.

, , " ". , .

0

All Articles