Monday, November 25, 2013

Performance testing with different IP addresses



    Recently I saw a web hosting company which has a creative approach on charging:   by page views on a given day,  defined as the number of visitors to the web site with unique IP addresses.    This is interesting in that it protects the site owner from being charged when a hacker uses a tool and generates lots of "hits" to the web site.   Being able to emulate different IP addresses in testing such an infrastructure will definitely be helpful.

   We mentioned in earlier blogs that that a Netgend performance test platform can emulate 50,000 VUsers.  In fact, it can maintain 50,000 concurrent TCP sessions.  So, can all the VUsers have unique IP addresses? The answer is yes.

   To do this, we just need to specify the following parameters:
  • Ranges of IP addresses
  • virtual IP
  • gateway IP. 
  • route to server
    As an example, suppose

  • You connect the test platform to an interface of a router,  the router's interface IP address is 192.168.5.1,  
  • You want to emulate IP addresses in two ranges:  11.1.1.1-11.1.1.100, 12.23.1.5-12.23.1.200,  
  • The target servers have IP addresses in 10.10.10.0/24
    Your configuration can be the following:

 range: 11.1.1.1-11.1.1.100, 12.23.1.5-12.23.1.200  
 virtual router IP: 192.168.5.11  
 gateway IP: 192.168.5.1  
 route to Servers: 10.10.10.0/24  

    Note that the "virtual router IP" above can be considered as a "gateway" to IP addresses in the ranges (client IP addresses).  The physical router will need it to set up route to reach the client IP addresses.

    On many OS, one can assign multiple IP addresses to an interface. But it is not scalable in terms of the time consumed in configuration and the number of IP addresses allowed.   One can also try user-space TCP/IP stack, but it may miss many features of a standard TCP/IP stack on  windows, Linux or Mac.   On the netgend platform we use an innovative method to "enable" an OS to have many different IP addresses   You can ping them to verify.

    Other than testing the above infrastructure, another benefit of using unique IP addresses in performance test is on trouble-shooting.  Suppose you have network sniffer (like Wireshark) that captures all the packets during testing, it will be a nightmare if all the sessions are from the same IP addresses. With different IP addresses for clients,  it will be much easier to keep track of any of the clients - you can extract all the packets related to a client and study them.

   With social media gaining momentum,  I am sure there will be more examples of server infrastructure that can make good use of the IP addresses from clients.   Can your favorite performance testing platform support it?

 

No comments:

Post a Comment