1台のJmeterで複数台のネームベースの仮想ホストに負荷をかける方法

1台のJmeterから複数台のWEBサーバに同時に負荷をかけたい場合、スレッドグループを複数作成してIPアドレスを指定してやれば実現できますが、対象ホストがネームベースの仮想ホストの場合は添付の様にHTTPヘッダマネージャーでホストヘッダー値を指定してやればOKです。
ただし、リダイレクトが掛かっている場合は思い通りの動作をしてくれません。

Jmeter_01

jmeter_02

====================================================
http://192.168.0.100
Host:server-tech.xyz

http://192.168.0.101
Host:server-tech.xyz

とした場合、/から/topにリダイレクト設定がかかっているので、ホストヘッダーを書き換えても片側に寄ってしまった。

SVR-WEB01
2015-04-23 23:18:03 SVR-WEB01 192.168.0.100 GET / – 80 – 192.168.0.200 HTTP/1.1 Apache-HttpClient/4.2.6+(java+1.5) – – server-tech.xyz 301 0 0 894 112 406
2015-04-23 23:18:03 SVR-WEB01 192.168.0.100 GET /top/ – 80 – 192.168.0.200 HTTP/1.1 Apache-HttpClient/4.2.6+(java+1.5) – – server-tech.xyz 200 0 0 26520 116 140
2015-04-23 23:18:03 SVR-WEB01 192.168.0.100 GET / – 80 – 192.168.0.200 HTTP/1.1 Apache-HttpClient/4.2.6+(java+1.5) – – server-tech.xyz 301 0 0 894 112 171
2015-04-23 23:18:03 SVR-WEB01 192.168.0.100 GET /top/ – 80 – 192.168.0.200 HTTP/1.1 Apache-HttpClient/4.2.6+(java+1.5) – – server-tech.xyz 200 0 0 26520 116 109
2015-04-23 23:18:03 SVR-WEB01 192.168.0.100 GET / – 80 – 192.168.0.200 HTTP/1.1 Apache-HttpClient/4.2.6+(java+1.5) – – server-tech.xyz 301 0 0 894 112 171
2015-04-23 23:18:04 SVR-WEB01 192.168.0.100 GET /top/ – 80 – 192.168.0.200 HTTP/1.1 Apache-HttpClient/4.2.6+(java+1.5) – – server-tech.xyz 200 0 0 26520 116 296
2015-04-23 23:18:04 SVR-WEB01 192.168.0.100 GET / – 80 – 192.168.0.200 HTTP/1.1 Apache-HttpClient/4.2.6+(java+1.5) – – server-tech.xyz 301 0 0 894 112 187
2015-04-23 23:18:04 SVR-WEB01 192.168.0.100 GET /top/ – 80 – 192.168.0.200 HTTP/1.1 Apache-HttpClient/4.2.6+(java+1.5) – – server-tech.xyz 200 0 0 26520 116 93
2015-04-23 23:18:04 SVR-WEB01 192.168.0.100 GET / – 80 – 192.168.0.200 HTTP/1.1 Apache-HttpClient/4.2.6+(java+1.5) – – server-tech.xyz 301 0 0 894 112 156
2015-04-23 23:18:04 SVR-WEB01 192.168.0.100 GET /top/ – 80 – 192.168.0.200 HTTP/1.1 Apache-HttpClient/4.2.6+(java+1.5) – – server-tech.xyz 200 0 0 26520 116 109
2015-04-23 23:18:06 SVR-WEB01 192.168.0.100 GET /top/ – 80 – 192.168.0.200 HTTP/1.1 Apache-HttpClient/4.2.6+(java+1.5) – – server-tech.xyz 200 0 0 26520 116 343
2015-04-23 23:18:06 SVR-WEB01 192.168.0.100 GET /top/ – 80 – 192.168.0.200 HTTP/1.1 Apache-HttpClient/4.2.6+(java+1.5) – – server-tech.xyz 200 0 0 26520 116 109
2015-04-23 23:18:06 SVR-WEB01 192.168.0.100 GET /top/ – 80 – 192.168.0.200 HTTP/1.1 Apache-HttpClient/4.2.6+(java+1.5) – – server-tech.xyz 200 0 0 26520 116 125
2015-04-23 23:18:06 SVR-WEB01 192.168.0.100 GET /top/ – 80 – 192.168.0.200 HTTP/1.1 Apache-HttpClient/4.2.6+(java+1.5) – – server-tech.xyz 200 0 0 26520 116 109
2015-04-23 23:18:07 SVR-WEB01 192.168.0.100 GET /top/ – 80 – 192.168.0.200 HTTP/1.1 Apache-HttpClient/4.2.6+(java+1.5) – – server-tech.xyz 200 0 0 26520 116 281

SVR-WEB02
2015-04-23 23:18:06 SVR-WEB02 192.168.0.101 GET / – 80 – 192.168.0.200 HTTP/1.1 Apache-HttpClient/4.2.6+(java+1.5) – – server-tech.xyz 301 0 0 894 112 421
2015-04-23 23:18:06 SVR-WEB02 192.168.0.101 GET / – 80 – 192.168.0.200 HTTP/1.1 Apache-HttpClient/4.2.6+(java+1.5) – – server-tech.xyz 301 0 0 894 112 187
2015-04-23 23:18:06 SVR-WEB02 192.168.0.101 GET / – 80 – 192.168.0.200 HTTP/1.1 Apache-HttpClient/4.2.6+(java+1.5) – – server-tech.xyz 301 0 0 894 112 171
2015-04-23 23:18:06 SVR-WEB02 192.168.0.101 GET / – 80 – 192.168.0.200 HTTP/1.1 Apache-HttpClient/4.2.6+(java+1.5) – – server-tech.xyz 301 0 0 894 112 156
2015-04-23 23:18:07 SVR-WEB02 192.168.0.101 GET / – 80 – 192.168.0.200 HTTP/1.1 Apache-HttpClient/4.2.6+(java+1.5) – – server-tech.xyz 301 0 0 894 112 375

====================================================

http://192.168.0.100/top
Host:server-tech.xyz

http://192.168.0.101/top
Host:server-tech.xyz

とした場合は均等にわかれる(想定通りの動作)

SVR-WEB01
2015-04-24 01:00:44 SVR-WEB01 192.168.0.100 GET /top – 80 – 192.168.0.200 HTTP/1.1 Apache-HttpClient/4.2.6+(java+1.5) – – server-tech.xyz 200 0 0 26520 115 359
2015-04-24 01:00:44 SVR-WEB01 192.168.0.100 GET /top – 80 – 192.168.0.200 HTTP/1.1 Apache-HttpClient/4.2.6+(java+1.5) – – server-tech.xyz 200 0 0 26520 115 125
2015-04-24 01:00:44 SVR-WEB01 192.168.0.100 GET /top – 80 – 192.168.0.200 HTTP/1.1 Apache-HttpClient/4.2.6+(java+1.5) – – server-tech.xyz 200 0 0 26520 115 109
2015-04-24 01:00:44 SVR-WEB01 192.168.0.100 GET /top – 80 – 192.168.0.200 HTTP/1.1 Apache-HttpClient/4.2.6+(java+1.5) – – server-tech.xyz 200 0 0 26520 115 125
2015-04-24 01:00:44 SVR-WEB01 192.168.0.100 GET /top – 80 – 192.168.0.200 HTTP/1.1 Apache-HttpClient/4.2.6+(java+1.5) – – server-tech.xyz 200 0 0 26520 115 93

SVR-WEB02
2015-04-24 01:01:00 SVR-WEB02 192.168.0.101 GET /top – 80 – 192.168.0.200 HTTP/1.1 Apache-HttpClient/4.2.6+(java+1.5) – – server-tech.xyz 200 0 0 26520 115 13359
2015-04-24 01:01:00 SVR-WEB02 192.168.0.101 GET /top – 80 – 192.168.0.200 HTTP/1.1 Apache-HttpClient/4.2.6+(java+1.5) – – server-tech.xyz 200 0 0 26520 115 125
2015-04-24 01:01:00 SVR-WEB02 192.168.0.101 GET /top – 80 – 192.168.0.200 HTTP/1.1 Apache-HttpClient/4.2.6+(java+1.5) – – server-tech.xyz 200 0 0 26520 115 109
2015-04-24 01:01:00 SVR-WEB02 192.168.0.101 GET /top – 80 – 192.168.0.200 HTTP/1.1 Apache-HttpClient/4.2.6+(java+1.5) – – server-tech.xyz 200 0 0 26520 115 109
2015-04-24 01:01:00 SVR-WEB02 192.168.0.101 GET /top – 80 – 192.168.0.200 HTTP/1.1 Apache-HttpClient/4.2.6+(java+1.5) – – server-tech.xyz 200 0 0 26520 115 93

=====================================================

Comments are closed.