Usage of multiple IPs

Hey guys,

I’m looking into using gatling for performance analyses.

One thing I’ve seen no mention of, is support for multiple different ips to simulate from.

Does gatling support this sort of thing?

Thanks,

Josh

Hi,

Sure, Gatling support this :wink:

In your protocol configuration, instead of using baseURL, use baseURLs and configure the list of IP or domain names to use.
Here is baseURL(s) documentation : https://github.com/excilys/gatling/wiki/HTTP#wiki-base-url

Cheers,

Pierre

I think he there might be a possibility he may be interested in this: https://github.com/excilys/gatling/wiki/Scaling-out

So, you can’t really simulate “from IP.” You would either need different servers or different VMs on your machine so that you have multiple IPs to actually run simulations from.

Thanks for the responses guys!

BaseURL will fit my case because that’ll just change the remote IP that gatling hits, I’m trying to use different local ips

My server has 300 public ips, I would like to make use of them. A similar case would be assigning multiple ips onto a server in a LAN environment.

I checked out the scaling-out document earlier, but in my case I’d like to use my single server.

Any ideas?

Hi,

I honestly see no way to do that using Gatling (and, to be honest, fiddling with your network configuration is not really its job ;-))
I think you’ll have to rely on some network tool to do it or, as Spencer suggested, run from multiple computers or multiple VMs.

I’ve seen something related in Java’s java.net.URL.setURLStreamHandlerFactory - to guarantee a randomized selection when a stream is opened to a URL.

I don’t know (and think it unlikely) that scala is using this code under the covers (but I’m a newb, so I really don’t know).

But it might a place to start looking and figure out if it would work with scala or if there’s an analog.

I saw this in a related stack overflow question when searching last week. I can’t find it now.

You can set up the virtual host on the HttpProtocol (so, globally), and per request.
However, the per request set up is currently static (takes a String) and I guess you’d like to set it up per user, for example with a feeder.
If I make it dynamic, would that suit your needs?

Done https://github.com/excilys/gatling/issues/1342