6

I want to load test a socks proxy I have setup on aws. I would like to generate traffic from outside of the vpc. For now testing from my local machine should be sufficient but eventually I would like to move testing to one or more ec2 instances. JMeter seems to be a widely used tool for load testing but if anyone has any other suggestions it would be greatly appreciated.

michael_65
  • 571
  • 1
  • 6
  • 10

3 Answers3

7

Using Jmeter through a SOCKS proxy is surprisingly simple;

  1. Start your SOCKS proxy e.g on Linux ssh -D8080 https://dmz.server

  2. Start Jmeter with JVM arg to use your proxy for all connections

    java -DsocksProxyHost=localhost -DsocksProxyPort=8080 -jar ApacheJMeter.jar

kosgeinsky
  • 508
  • 3
  • 21
  • 2
    Brilliant, thanks. To launch from the jmeter shell script, I run: `JVM_ARGS='-DsocksProxyHost=127.0.0.1 -DsocksProxyPort=2001' ~/Applications/apache-jmeter-3.0/bin/jmeter "$@" &` – Brett Nov 04 '16 at 15:44
  • I'd guess this would be the way to go, yet somehow it's not working for me. I can call the same endpoint on a rest client on my browser, but it does not work from jmeter. I get Response code: Non HTTP response code: java.net.UnknownHostException. Ideas? – redwulf Dec 21 '16 at 11:27
  • @redwulf Please check the log output from JMeter. It should give a clue on how the connection is being setup. – kosgeinsky Dec 21 '16 at 18:09
1

It depends on your programming skills as JMeter is the only GUI-based tool.

For instance

  • Tsung is known for built-in Benchmarking a proxy server support and possibility to generate more load on less powerful machines
  • Gatling has very nice reports and very "pleasant" Scala-based DSL
  • Grinder - this guy can record requests on TCP level (while others support HTTP only). You need to know Python to modify and create Grinder scripts.

For more details on aforementioned tools see Open Source Load Testing Tools: Which One Should You Use? article, hopefully it will help to choose the right option.

Dmitri T
  • 159,985
  • 5
  • 83
  • 133
0

One thing I noticed with the Socks Proxy support through the -D is for me the "HTTP Request" samplers would not use the Socks Proxy unless in the "HTTP Request Defaults" config element I set the "Implementation" to Java.