1

I would like to load test my Netty (TCP port 5000), Kafka, Storm project. Can someone indicate a good tool for generating load. I have looked at Jmeter TCP sampler but from what i understand it requires many EC2 instances in order to simuate 200k concurrent users?

My Netty Server is accepting short incoming TCP requests on Port 5000 Not http.

Thanks in advance

2 Answers2

1

You could use the wrk benchmarking tool. You didn't give any details of your project, but something like:

wrk -H 'Host: localhost' \ 
    -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' \ 
    -H 'Connection: keep-alive' \ 
    -d 120 -c 256 -t 16 --pipeline 256  YOUR_TESTING_URL

might work in your situation.

hrbrmstr
  • 77,368
  • 11
  • 139
  • 205
0

You can use Jmeter for testing Tcp. or u can create a custom class which will generate netty clients.

client method

  @Override
    public void run()  {

        // Configure the client.
        EventLoopGroup group = new NioEventLoopGroup();
        try {


            Bootstrap b = new Bootstrap();
            b.group(group)
                    .channel(NioSocketChannel.class)
                    .option(ChannelOption.TCP_NODELAY, true)
                    .handler(new ChannelInitializer<SocketChannel>() {
                        @Override
                        public void initChannel(SocketChannel ch) throws Exception {
                            ChannelPipeline p = ch.pipeline();
                            // p.addLast(new LoggingHandler(LogLevel.DEBUG));
                            p.addLast(new ClientsHandler2());
                        }
                    });
                // Start the client.
                ChannelFuture f = b.connect(HOST, PORT).sync();
                // Wait until the connection is closed.
                f.channel().closeFuture().sync();



        } catch (InterruptedException e) {
            e.printStackTrace();
        } finally {
            // Shut down the event loop to terminate all threads.
            group.shutdownGracefully();
        }
    }
Mikhail
  • 2,690
  • 4
  • 28
  • 43