7月 13th, 2009

mod_proxy_balancerのパラメータ? ?

Posted in Apache by admin

Apache2.2よりApache標準モジュールであるmod_proxy_ajpぜ AJP1.3プロトコルがサポートされました。また、mod_proxy_balancer による負荷分散? 能の強化により、Apacheのリバースプロキシとしての? 能が充実しました。実際にリバースプロキ゜ Apacheぜ APサーバTomcatでサーバを構成する場合、多種のパラメータをどう設? するかを検? してみました。

mod_proxy_balancerのパラメータには、ProxyPass(mod_rewriteでプロキシする場合ぜ ProxySet)ディレクティブに設定するバランサーパラメータぜ BalancerMemberディレクティブに設定するワーカーパラメータがあります。timeoutは各パラメータに同名ものが存在しますが、? 味が異なるので注? が必要です。すべてのパラメータを解説するのは大変なので、一部パラメータのみ? として挙げたいと思います。

# 設? 例(実際には改? は? りません)
ProxyRequests Off
ProxyPass /examples/ balancer://BALANCER/examples/ \
		# バランサーパラメー゜   \
		lbmethod=byrequests \
		timeout=1 \
		nofailover=Off  \
		stickysession=JSESSIONID|jsessionid
<Proxy balancer://BALANCER/>
	BalancerMember ajp://host1:8080/ \
		# ワーカボ (1)パラメー゜  \
		loadfactor=10 \
		route=tomcat1 \
		retry=5 \
	BalancerMember ajp://host2:8080/ \
		# ワーカボ (2)パラメー゜  \
		loadfactor=10 \
		route=tomcat1 \
		retry=5 \
	# バランサーパラメー゜
	# ProxySet lbmethod=byrequests
	# ProxySet timeout=1
	# ProxySet nofailover=Off
	# ProxySet stickysession=JSESSIONID|jsessionid
</Proxy>

バランサーパラメー゜

  • lbmethod・・・分散方? の選択。byrequests(リクエスト回? )、bytraffic(バイト単位転送釜 )、bybusyness(フリーのワーカ優先)から選択する。要件次第ですが、殆どの場合はデフォルトの「byrequests(リクエスト回? )」でしょうか。
  • timeout・・・フリーのワーカーを圏 得するまでの最大? 機時間。デフォルトでは「待機しない」ので、大釜 のリクエストが要求された場合に? 機せずにそのままエラーを返してしまう事がある。従って、1秒を指定しておぜ 。1秒も待ってフリーのワーカを圏 得できない場合は、別の問題が発生していると考えた方が良いでしょう。
  • stickysession・・・アプリケーション側でスティッキーセッションの? 件がある場合は有効にする。Apache2.2.4以降では「JSESSIONID|jsessionid」のように大文字/? 文字両方を指定できます。大文字ぜ Cookieぜ JSESSIONID、? 文字ぜ URLパラメータに? 加されたjsessionidを圏 得する際に利用します。
  • nofailover・・・「On」の場合にはワーカ側でエラーとなった場合にセッションを切りフェイルオーバーしない。「Off」の場合は、フェイルオーバーするが フェイルオーバー先のホストでもセッション情報が保たれていないとアプリケーション側でエラーになるケースが多い。Tomcatクラスタリングを構成し、セッションレプリケーションを構成している場合に有効になる設? 項目。
  • maxattempts・・ボ F/Oを試みる回数を指定。nofailover=Offの時に有効になるパラメータ。バランシングするワーカが3つ以上ある場合、デフォルトぜ 1以? を指定するケースもありそう。
  • ワーカーパラメー゜

  • loadfactor・・・ワーカーあたりの? 荷? 数。10:10或いぜ 100:100等のようにしておき、運用時に調整する方? 等が考えられます。
  • route・・・スティッキーセッション有効の場合に指定します。Tomcatぜ JvmRoute値と同期する必要があります。
  • retry・・・リトライのタイムアウト時間。リトライタイムアウト時間とは、一府 ApacheがTomcatにコネクションを張りにいって失敗した(接続できない)場合に、次に再び接続失敗したワーカに接続しにいぜ ようになるまでの時間を指します。この時間を短ぜ すると、ワーカのオンライン復帰? に使用されるようになるまでの時間を短縮できます。デフォルトでぜ 60秒間になっているので長すぜ る為、「5秒」としています。
  • keepalive・・ボ Apache/Tomcat間ぜ FireWallがある場合、FireWallは非活動状態のセッションを落としにかかるので、これを防ぐ場合に使用する。Apache側ぜ MPMがマルチプロセスの場合、パフォーマンス面でもあまり効果が無いようです。
  • redirect・・・? つのワーカが利用? 可となりセッションが保持されていない場合、この値で指定したrouteのワーカにリダイレクトされる。セッションを使用していないアプリケーションは、昜 示的に次のワーカリダイレクトを指定できる。ワーカが2つならばあまり? 味はないが、3つ以上のワーカから次のワーカを昜 示的に指定したい場合は利用価値があるかもしれません。
  • lbset・・・ワーカへのアクセスの優先順位を決めることが出来る。
  • status・・・「D:利用? 可」「S:停止」「I:無? 」「H:ホットスタンバイ」「E:エラー」から選択。主に運用時に使用される目的のパラメータが多い。「H]ホットスタンバイについては利用価値が高い。ホットスタンバイ? 能を使用したい場合は非常に有効。
  • timeout・・ボ Tomcatに「/」リクエストを送ったときのタイムアウト時間。デフォルト? ProxyTimeout=TimeOut=300秒。300秒も待つ? 要はないと思うが・ボ
  • connectiontimeout・・ボ ApacheがTomcatに接続するまでの? ち時間。デフォルト? TimeOut=300秒。300秒も待つ? 要はないと思うが・・ボ
  • http://httpd.apache.org/docs/2.2/en/mod/mod_proxy.html#proxypass

    You can leave a comment, or trackback from your own site. RSS 2.0

    93 comments

    1. クリバース says:

      クリバースを探して気づいたこと。通販放送で取り扱っている物品はすべてネットで買えるわけではない。通信販売放送で通販番組終わりから30分以内特定の特典は、インターネット購入の場合、四六時中実践されている。

      12月 12th, 2016 at 16:18:07

    2. http://invergordon.org says:

      Oh my goodness! Impressive article dude!

      Thank you so much, However I am encountering difficulties with
      your RSS. I don’t know the reason why I am unable to subscribe to it.
      Is there anybody else having similar RSS issues? Anyone who knows the answer can you kindly respond?
      Thanks!!

      9月 12th, 2018 at 21:39:11

    3. http://thptnguyentruongto.edu.vn says:

      I pay a visit daily some web sites and websites to read posts, but this
      website offers feature based articles.

      9月 26th, 2018 at 13:09:13

    4. buy cheap proxies says:

      Hi there terrific blog! Does running a blog similar to this take a great deal of work?
      I’ve absolutely no understanding of programming
      but I had been hoping to start my own blog soon. Anyway, should
      you have any suggestions or tips for new blog owners
      please share. I know this is off subject but I just wanted to ask.
      Thank you!

      1月 11th, 2019 at 20:08:56

    5. Google says:

      We came across a cool web page which you could possibly appreciate. Take a appear in case you want.

      1月 22nd, 2019 at 6:31:58

    6. pirandello opere principali says:

      the time to read or pay a visit to the subject material or web pages we’ve linked to below the

      1月 23rd, 2019 at 7:40:21

    7. Rock in A says:

      below you will uncover the link to some internet sites that we feel it is best to visit

      1月 23rd, 2019 at 10:39:46

    8. mp3 download says:

      we came across a cool internet site that you simply may possibly appreciate. Take a look in case you want

      1月 23rd, 2019 at 16:17:53

    9. птица с человеческим лицом says:

      Here are several of the websites we advocate for our visitors

      1月 24th, 2019 at 17:36:02

    10. запах синонимы says:

      Here is an excellent Blog You might Come across Intriguing that we Encourage You

      1月 24th, 2019 at 19:42:37

    11. mp3cool says:

      Can I just say what a relief to find someone who actually knows what theyre talking about on the internet. You definitely know how to bring an issue to light and make it important. More people need to read this and understand this side of the story. I cant believe youre not more popular because you definitely have the gift. https://www.mp3cool.live

      1月 25th, 2019 at 0:24:42

    12. Google says:

      Here are some links to websites that we link to simply because we believe they are worth visiting.

      1月 25th, 2019 at 7:57:02

    13. емельян значение имени says:

      that will be the end of this post. Here you will discover some web pages that we consider you

      1月 25th, 2019 at 12:22:52

    14. день лесной промышленности says:

      here are some hyperlinks to web-sites that we link to for the reason that we think they’re worth visiting

      1月 25th, 2019 at 19:18:13

    15. Present says:

      very few web-sites that happen to become comprehensive beneath, from our point of view are undoubtedly properly really worth checking out

      1月 25th, 2019 at 20:17:23

    16. sexy chat says:

      here are some links to web pages that we link to because we feel they may be really worth visiting

      1月 26th, 2019 at 8:04:35

    17. Mississauga microblading says:

      Here are some of the web-sites we advocate for our visitors

      1月 26th, 2019 at 12:50:24

    18. Free chaturbate says:

      Sites of interest we’ve a link to

      1月 26th, 2019 at 14:56:29

    19. desigirl says:

      check beneath, are some completely unrelated web-sites to ours, having said that, they may be most trustworthy sources that we use

      1月 27th, 2019 at 9:40:25

    20. افلام نيك امهات says:

      usually posts some quite intriguing stuff like this. If you are new to this site

      1月 27th, 2019 at 10:12:02

    21. clit suction pump says:

      check below, are some completely unrelated internet sites to ours, on the other hand, they’re most trustworthy sources that we use

      1月 28th, 2019 at 8:07:46

    22. 로투스카지노 says:

      although internet websites we backlink to beneath are considerably not associated to ours, we feel they’re actually really worth a go via, so have a look

      1月 28th, 2019 at 11:42:05

    23. adam and eve g spot vibrator says:

      check below, are some totally unrelated web sites to ours, having said that, they’re most trustworthy sources that we use

      1月 28th, 2019 at 15:11:02

    24. best prostate massager says:

      that could be the end of this write-up. Here you will uncover some web-sites that we think you

      1月 28th, 2019 at 16:21:08

    25. 토토사이트 says:

      although web sites we backlink to beneath are considerably not associated to ours, we really feel they may be really worth a go through, so have a look

      1月 29th, 2019 at 23:57:30

    26. 안전놀이터 says:

      we prefer to honor numerous other net web pages on the web, even if they aren

      1月 30th, 2019 at 0:43:20

    27. 해외놀이터 says:

      usually posts some incredibly interesting stuff like this. If you

      1月 30th, 2019 at 8:48:29

    28. Caribbean steel drum band says:

      Every once in a whilst we pick blogs that we study. Listed beneath would be the most recent websites that we opt for

      1月 30th, 2019 at 12:45:26

    29. 토토사이트 says:

      Wonderful story, reckoned we could combine some unrelated information, nonetheless actually really worth taking a appear, whoa did 1 study about Mid East has got far more problerms also

      1月 31st, 2019 at 11:24:51

    30. 토토사이트 says:

      Wonderful story, reckoned we could combine a few unrelated information, nonetheless seriously really worth taking a appear, whoa did one particular master about Mid East has got additional problerms as well

      1月 31st, 2019 at 12:12:47

    31. Lina says:

      It’s genuinely very complex in this busy life to listen news on Television, so I just use web
      for that reason, and get the hottest news.

      2月 1st, 2019 at 10:57:37

    32. 토토사이트 says:

      one of our visitors lately advised the following website

      2月 1st, 2019 at 11:32:52

    33. 먹튀검증 says:

      Here are several of the web sites we suggest for our visitors

      2月 1st, 2019 at 11:49:56

    34. 토토사이트 says:

      Wonderful story, reckoned we could combine a handful of unrelated data, nonetheless truly worth taking a appear, whoa did one find out about Mid East has got more problerms as well

      2月 1st, 2019 at 16:37:50

    35. 안전공원 says:

      we came across a cool site that you may appreciate. Take a look if you want

      2月 1st, 2019 at 20:31:22

    36. #TheConsultants says:

      Sites of interest we have a link to

      2月 2nd, 2019 at 1:49:14

    37. #AbsoluteENT says:

      below you will find the link to some internet sites that we think you should visit

      2月 2nd, 2019 at 1:54:48

    38. #Section808 says:

      check below, are some completely unrelated web sites to ours, on the other hand, they’re most trustworthy sources that we use

      2月 2nd, 2019 at 12:39:02

    39. Fenstermontage says:

      just beneath, are various completely not connected web-sites to ours, nevertheless, they may be certainly worth going over

      2月 2nd, 2019 at 18:10:20

    40. гравитационные волны очень большой длины says:

      very handful of web sites that occur to be in depth below, from our point of view are undoubtedly nicely really worth checking out

      2月 3rd, 2019 at 23:55:26

    41. Academia Baeza guardia civil says:

      usually posts some pretty interesting stuff like this. If you

      2月 4th, 2019 at 0:07:30

    42. пули летят says:

      one of our visitors not too long ago encouraged the following website

      2月 4th, 2019 at 7:01:34

    43. 먹튀검증 says:

      the time to read or go to the content or web-sites we’ve linked to beneath the

      2月 4th, 2019 at 14:18:10

    44. 네임드사다리 says:

      that will be the end of this article. Right here you

      2月 4th, 2019 at 17:14:41

    45. iosgg.com says:

      that is the finish of this report. Here you will discover some sites that we think you will value, just click the links over

      2月 5th, 2019 at 4:16:26

    46. documents required for nidhi company registration says:

      always a big fan of linking to bloggers that I like but don

      2月 5th, 2019 at 11:43:15

    47. 메이저사이트 says:

      below you will uncover the link to some web pages that we think you should visit

      2月 6th, 2019 at 10:37:41

    48. 토토사이트 says:

      just beneath, are many absolutely not connected web sites to ours, nevertheless, they are certainly really worth going over

      2月 6th, 2019 at 12:00:01

    49. 먹튀검증 says:

      just beneath, are several entirely not connected web sites to ours, even so, they’re surely worth going over

      2月 6th, 2019 at 16:26:33

    50. 안전공원 추천 says:

      one of our guests not too long ago proposed the following website

      2月 6th, 2019 at 17:03:48

    51. 네임드사다리 says:

      Sites of interest we’ve a link to

      2月 6th, 2019 at 20:33:25

    52. 토토사이트 says:

      here are some hyperlinks to web sites that we link to due to the fact we assume they are really worth visiting

      2月 6th, 2019 at 23:26:42

    53. 먹튀검증 says:

      Sites of interest we have a link to

      2月 7th, 2019 at 6:00:36

    54. 안전공원 says:

      Here is a good Blog You may Come across Exciting that we Encourage You

      2月 7th, 2019 at 6:33:42

    55. best male sex toy says:

      we came across a cool internet site that you could possibly take pleasure in. Take a look in the event you want

      2月 7th, 2019 at 17:18:08

    56. https://mt-site.net says:

      I could not refrain from commenting. Perfectly written!

      my homepage – https://mt-site.net

      2月 8th, 2019 at 3:20:21

    57. https://muk-hhh.com says:

      It’s going to be finish of mine day, except before finish I am reading this impressive article to improve my know-how.

      Feel free to surf to my blog post: https://muk-hhh.com

      2月 8th, 2019 at 10:03:06

    58. 토토사이트 says:

      the time to read or go to the material or web pages we have linked to below the

      2月 8th, 2019 at 22:59:28

    59. 메이저 토토사이트 says:

      one of our visitors not too long ago encouraged the following website

      2月 9th, 2019 at 1:04:37

    60. 메이저공원 says:

      always a major fan of linking to bloggers that I enjoy but really don’t get a whole lot of link adore from

      2月 9th, 2019 at 2:36:51

    61. 먹튀검증 says:

      Every when in a whilst we pick out blogs that we study. Listed below would be the latest web-sites that we decide on

      2月 9th, 2019 at 4:01:58

    62. Manda Fili says:

      This web site is really a walk-through for all of the info you wanted about this and didn’t know who to ask. Glimpse here, and you’ll definitely discover it. https://wapfresh.com

      2月 9th, 2019 at 7:20:10

    63. 사다리사이트 says:

      Here is a good Weblog You may Obtain Interesting that we Encourage You

      2月 9th, 2019 at 13:19:39

    64. фантасмагории says:

      Sites of interest we’ve a link to

      2月 9th, 2019 at 20:19:56

    65. Google says:

      Please take a look at the web pages we adhere to, including this a single, because it represents our picks through the web.

      2月 9th, 2019 at 20:21:59

    66. ферраллитные почвы says:

      Here is a good Weblog You might Uncover Intriguing that we Encourage You

      2月 10th, 2019 at 3:41:25

    67. penis sleeve says:

      Here are several of the web-sites we advocate for our visitors

      2月 10th, 2019 at 18:09:21

    68. female nipple clamps says:

      that may be the end of this post. Right here you will uncover some web sites that we feel you will appreciate, just click the hyperlinks over

      2月 10th, 2019 at 20:02:12

    69. vibrating anal beads says:

      below you

      2月 11th, 2019 at 1:11:52

    70. Скачать песни says:

      we like to honor quite a few other web web-sites on the net, even when they aren

      2月 12th, 2019 at 19:15:33

    71. vps server says:

      Wonderful story, reckoned we could combine several unrelated data, nevertheless really really worth taking a search, whoa did one particular master about Mid East has got much more problerms also

      2月 12th, 2019 at 23:29:12

    72. large vibrators for women says:

      please check out the web sites we comply with, like this a single, because it represents our picks in the web

      2月 13th, 2019 at 3:30:20

    73. prostate vibrators says:

      here are some links to sites that we link to mainly because we feel they may be really worth visiting

      2月 13th, 2019 at 7:47:22

    74. waterproof anal sex toy says:

      that could be the finish of this article. Right here you

      2月 13th, 2019 at 9:29:10

    75. prostate toys for men says:

      usually posts some very fascinating stuff like this. If you are new to this site

      2月 13th, 2019 at 11:00:39

    76. anal plug set says:

      below you will uncover the link to some sites that we consider you should visit

      2月 13th, 2019 at 20:51:35

    77. dildo sex toys says:

      Wonderful story, reckoned we could combine a few unrelated information, nevertheless definitely worth taking a search, whoa did one particular study about Mid East has got more problerms too

      2月 13th, 2019 at 21:02:21

    78. luftbilder stuttgart says:

      very few web sites that transpire to be in depth below, from our point of view are undoubtedly very well really worth checking out

      2月 14th, 2019 at 7:28:56

    79. 토토사이트 검증 says:

      one of our visitors lately encouraged the following website

      2月 15th, 2019 at 4:09:25

    80. 토토사이트 says:

      although websites we backlink to below are considerably not connected to ours, we really feel they’re actually really worth a go via, so have a look

      2月 15th, 2019 at 4:23:31

    81. 먹튀검증 says:

      very handful of internet websites that happen to be in depth beneath, from our point of view are undoubtedly properly worth checking out

      2月 15th, 2019 at 6:22:59

    82. 안전공원 says:

      below you will obtain the link to some web-sites that we think you should visit

      2月 15th, 2019 at 7:58:55

    83. https://mttoto.com says:

      This post will assist thhe internet visitors foor building
      up new blog or even a blog from start to end.

      Here iis my web-site … https://mttoto.com

      2月 15th, 2019 at 19:41:36

    84. 네임드사다리 says:

      Wonderful story, reckoned we could combine some unrelated information, nonetheless genuinely really worth taking a search, whoa did a single understand about Mid East has got far more problerms also

      2月 15th, 2019 at 19:50:04

    85. مترجم sex محارم says:

      please visit the sites we comply with, such as this a single, as it represents our picks from the web

      2月 15th, 2019 at 23:30:38

    86. فیلم سکسی ایرانی says:

      just beneath, are various totally not related web-sites to ours, on the other hand, they are certainly really worth going over

      2月 15th, 2019 at 23:47:52

    87. LolyCam 18+ says:

      always a huge fan of linking to bloggers that I enjoy but really don’t get a good deal of link really like from

      2月 16th, 2019 at 18:03:42

    88. 토토사이트 says:

      below you

      2月 17th, 2019 at 1:07:47

    89. 메이저사이트 says:

      usually posts some pretty fascinating stuff like this. If you are new to this site

      2月 17th, 2019 at 1:48:26

    90. 먹튀검증 says:

      always a major fan of linking to bloggers that I enjoy but don

      2月 17th, 2019 at 3:59:18

    91. 사다리사이트 says:

      one of our guests not long ago advised the following website

      2月 17th, 2019 at 18:30:22

    92. 안전공원 says:

      Wonderful story, reckoned we could combine some unrelated information, nonetheless truly really worth taking a search, whoa did one master about Mid East has got extra problerms too

      2月 17th, 2019 at 22:30:37

    93. 토토사이트 says:

      usually posts some pretty exciting stuff like this. If you are new to this site

      2月 17th, 2019 at 23:47:00

    Leave a comment