How to use multiple proxy with JMeter - proxy

I have a load balancer and I want to test the performance of the load balancer. I am using Apache JMeter to test the load balancer. I need to change my IP address so that the client IP is always different. My uni doesn't allow me to add multiple IP addresses (IP spoofing / IP alias).
So, the other option is to use a proxy server. Is there a way to use 2 or more proxy server in JMeter at one go? I can only specify one proxy server at a time at the moment.
Is there a way to turn it around?

You can use "Server name /IP" configuration in "HTTP Request" sampler. But those IPs should belong to same network. You cant set jmeter with different Geo locations.

Related

how we can use web socket from multiple IP addresses in JMeter

I need to connect and send request for websocket from different IPs in jmeter to my singalR server. How can I do it. I know in case of HTTP request we can do that in jmeter by creating multiple IP addresses alias on the machine as mentioned in the link https://www.blazemeter.com/blog/how-to-send-jmeter-requests-from-different-ips.
How this process will work for websockets.?
Thanks.
It will not as the possibility to set outgoing IP address needs to be present in the WebSocket plugin you're using.
Currently available solution is to allocate as many machines as IP addresses you need and run JMeter in distributed mode. If a single machine is powerful enough you can kick off several JMeter slave processes there, keep in mind that:
you need to have these IP addresses (or aliases) defined at OS level
you need to bind the slaves to different ports
If you can do Java programming you can add it yourself, the project lives at https://github.com/ptrd/jmeter-websocket-samplers, somewhere here
If you cannot - you can ask the plugin developer to add this feature either via GitHub or try reaching out to him via JMeter Plugins Support Forum

IP SPOOFING concept in Distributed load testing Jmeter

I am trying to invoke distributed load testing with jmeter (Which have 3 ips in it) and it is running in only one ip. Will other ips also run in the background or they won't even start?
If you have a Distributed JMeter Test architecture with 1 master and 3 slaves my expectation is that each JMeter slave has its own IP address so you should see requests coming from 3 different IPs to the system under test.
If you need to mimic more IP addresses - there is "Source address" section which lives under "Advanced" tab of the HTTP Request sampler where you can specify the desired outgoing IP address.
But be aware that the IP address (or its alias) must exist on the operating system level in order to be used at this field so you need to ensure that all source IP addresses you're going to use exist and are usable by JMeter.
Check out Using IP Spoofing to Simulate Requests from Different IP Addresses with JMeter for comprehensive information and example configurations

When I tried to put 500 users load by using JMeter, then Connection time out is showing due to IP is blocking

When the No. of threads are 500 then following error is showing
failed: Connection timed out: connect, My IP is blocking due to multiple hits,
How can I provide 500 users load and My IP should not be blocked.
Well, you need to contact your ISP support and inform them that you're going to use your IP address for some performance testing and ask them to whitelist your IP in their DSoS attack protection software. If your ISP doesn't support this form of usage of your Internet channel - consider changing it or using a cloud VM service provider like Amazon EC2 or Microsoft Azure)
If might also be the case your system under test doesn't allow multiple connections from a single IP address due to aforementioned DDoS attack prevention mechanism on web server level, if this is the case you can use IP Spoofing technique in order to mimic various different IP addresses (not that the IPs or IP aliases must be present in the operating system). The IP address can be configured in the "Source address" section of the HTTP Request sampler

ip spoofing not working jmeter

I am trying IP spoofing in JMeter HTTP requests but my public IP is going to the request, not the IP address which I have specified under advanced option in HTTP sampler. can anyone help me in this?
I am also sharing the screenshot of my test plan.
here
In my test plan my let's say my IP is x.x.x.x and the IP which I have configured for IP spoofing is: 192.168.23.12 as shown in the screenshot but request to the server is still going with my IP which is x.x.x.x.
Can anyone help me out in this?
As per HTTP Request sampler documentation
Source address field [Only for HTTP Request with HTTPClient implementation]
So change "Implementation" to HttpClient4 and it should start working as expected.
Also be aware that you need to have this IP address (or alias) defined in the underlying operating system.
See Using IP Spoofing to Simulate Requests from Different IP Addresses with JMeter article for more information and configuration instructions for different operating systems.
Please check the below test plan:-

JMeter can I run it locally?

In my opinion, load tests should be performed from several different IP addresses simultaneously(because of restrictions on http). Am I right?
I will do load tests for:
Number of Threads (users): 2000
Ramp-Up Period (in seconds): 10
The load doesn't necessarily have to come from different IP addresses however depending on your application nature it might be required (for example application does explicit check of origin IP address or lives behind a load balancer with session stickiness based on IP addresses or whatever)
In this case you can perform IP spoofing so each request would come from the different IP address, you can configure source IP address under "Source address" input on the "Advanced" tab of the HTTP Request sampler
See Using IP Spoofing to Simulate Requests from Different IP Addresses with JMeter for more details.
Yes you can run JMeter locally, it can be run anywhere that has a Java Virtual Machine.
Another alternative if you are interested is Gatling http://gatling.io/
To perform load test in serveral different IP address use Jmeter remote test
control multiple, remote JMeter engines from a single JMeter client. By running JMeter remotely, you can replicate a test across many low-end computers and thus simulate a larger load on the server.

Resources