Tuesday, February 4, 2014

1 Million concurrent connections from one load generator


    One million concurrent TCP connections is a great performance milestone both for a web server and for a performance test platform.  It's not trivial to be able to process 1M concurrent connections, maybe even harder to generate this many connections.   No wonder a performance test platform vendor is so proud that they put up ads that claim that their system can generate 1,000,000 concurrent connections - on hundreds of load generators.   In this blog, we are going to show that NetGend test platform can do that too - on a single load generator.

   Here is the simple script that our test platform uses to talk to our server.
 function VUSER() {   
      http.POSTData = "username=user${userId}&password=letmein";   
      action(http, "http://10.3.0.6/smartlogin");  
      sleep(500000);  
 }   
     Effectively, each client sets up a TCP connection to the server and does a HTTP transaction and keeps the connection open.  
     Here is the graph that shows that we have reached 1 M concurrent TCP Connections.  ("TCP open session" means established sessions).
 

   You may be thinking it's impossible to have that many TCP connections from the same client IP address to a web server (with one IP address) since there at most 65535 TCP ports on the client side.  You are right, with only one client IP address, we can't get there.  Luckily, NetGend platform  can emulate a range of IP addresses. In fact, it's not hard to emulate a million IP addresses on this platform.
The following is the set of parameters we used for our test,  there are about 25K IP addresses in the range.

   When you click the "run" button, the test platform will immediately start generating TCP sessions, in another word, it will not wait for minutes as is the case with the other test platforms.  At a rate of 5000 new sessions per second, it takes about 200 seconds to reach 1 million open sessions.

   In case you are wondering flexiblity of the test platform,  here is a short list of what this platform supports

  • Processing/parsing of JSON message, JSON Path,  JSONP messages,
  • JSON-RPC,
  • Processing of XML message and Xpath,
  • HTML message processing by Xpath, regular expression, string search 
  • HTML form filling that takes care of hidden fields and internal field names.
  • Combinations of (nested) conditions and/or loops
  • Rendezvous point
  • ...

     Note that the above parameterization and correlation, very complex on the other test platforms,  are made extremely simple (see other blogs in this site), even for those who don't have a lots of programming background.

     If you ever need to test a server on its ability to handle 1M connections,  you may want to give NetGend a try, it will show you the answer in a few minutes.

No comments:

Post a Comment