NAME
Gungho::Component::Throttle - スãƒãƒƒãƒˆãƒªãƒ³ã‚°ç”¨ãƒ™ãƒ¼ã‚¹ã‚¯ãƒ©ã‚¹
SYNOPSIS
package Gungho::Component::Throttle::Domain;
use base qw(Gungho::Component::Throttle);
DESCRIPTION
クãƒãƒ¼ãƒ©ãƒ¼ä½œæˆ�時ã�«ã�¯å¿…ã�šãƒªã‚¯ã‚¨ã‚¹ãƒˆæ•°ã‚’調整ã�™ã‚‹ã‚¹ãƒãƒƒãƒˆãƒªãƒ³ã‚°ã�Œå¿…è¦�ã�«ã�ªã‚Šã�¾ã�™ã€‚ ã�“ã�®ã‚³ãƒ³ãƒ�ーãƒ�ントã�¯ã‚¹ãƒãƒƒãƒˆãƒªãƒ³ã‚°ã�®è¦ªã‚¯ãƒ©ã‚¹ã�¨ã�—ã�¦æ©Ÿèƒ½ã�—ã�¾ã�™ã€‚実際ã�® スãƒãƒƒãƒˆãƒªãƒ³ã‚°ã�¯Throttle::Simpleã‚„Throttle::Domainã�®ã‚ˆã�†ã�ªå�クラスã�Œè¡Œã�„ã�¾ã�™ã€‚
Gungho::Component::Throttle::Simpleã�¯å�˜ç´”ã�«æ™‚間当ã�Ÿã‚Šã�®ãƒªã‚¯ã‚¨ã‚¹ãƒˆç·�æ•°ã‚’ ベースã�«ã‚¹ãƒãƒƒãƒˆãƒªãƒ³ã‚°ã‚’è¡Œã�„ã�¾ã�™ã€‚ã�©ã‚“ã�ªãƒªã‚¯ã‚¨ã‚¹ãƒˆã�§ã�‚ã�£ã�¦ã‚‚時間ã�‚ã�Ÿã‚Šã�® リクエストç·�æ•°ã�Œè¦�定値を上回ã�£ã�Ÿæ™‚点ã�§ã‚¹ãƒãƒƒãƒˆãƒªãƒ³ã‚°ã�•ã‚Œã�¾ã�™ã€‚
# throttle down to 100 requests / hour
components:
- Throttle::Simple
throttle:
simple:
max_iterms: 100
interval: 3600
Gungho::Component::Throttle::Domainã�¯ãƒ›ã‚¹ãƒˆãƒ�ーム毎ã�«ã‚¹ãƒãƒƒãƒˆãƒªãƒ³ã‚°ã‚’è¡Œã�„ã�¾ã�™ã€‚ ホスト毎ã�«æ™‚間当ã�Ÿã‚Šã�®ãƒªã‚¯ã‚¨ã‚¹ãƒˆç·�æ•°ã�Œè¦�定値を上回ã�£ã�Ÿæ™‚点ã�§ã‚¹ãƒãƒƒãƒˆãƒªãƒ³ã‚° ã�•ã‚Œã‚‹ã‚ˆã�†ã�«ã�ªã‚Šã�¾ã�™ã€‚
# throttle down to 100 requests / host / hour
components:
- Throttle::Domain
throttle:
domain:
max_iterms: 100
interval: 3600
Throttle::Domainã�¨Throttle::Simpleã�¯å†…部的ã�«Data::Throttlerã€�ã‚‚ã�—ã��ã�¯ Data::Throttler::Memcachedを使用ã�—ã�¾ã�™ã€‚1å�°ã�®ãƒ›ã‚¹ãƒˆã�§ã‚¯ãƒãƒ¼ãƒ©ãƒ¼ã‚’å‹•ã�‹ã�—ã�¦ã�„ã‚‹ å ´å�ˆã�¯æ™®é€šã�®Data::Throttlerã�§äº‹è¶³ã‚Šã�¾ã�™ã�Œã€�ã‚‚ã�—複数ホストã�§ã�®é�‹ç”¨ã‚’è¡Œã�† å ´å�ˆã�¯ã‚¹ãƒãƒƒãƒˆãƒªãƒ³ã‚°ãƒ‡ãƒ¼ã‚¿ã‚’å…¨ã�¦ã�®ãƒ›ã‚¹ãƒˆé–“ã�§å…±æœ‰ã�™ã‚‹å¿…è¦�ã�Œã�‚ã‚Šã�¾ã�™ã€‚ã�“ã�®å ´å�ˆã�¯ è¨å®šã�§throttlerタイプを指定ã�—ã€�memcachedãƒ�ックエンドを使用ã�™ã‚‹ Data::Throttler::Memcachedを使用ã�—ã�¦ã��ã� ã�•ã�„:
components:
- Throttle::Domain
throttle:
domain:
throttler: Data::Throttler::Memcached
cache:
data: 127.0.0.1:11211
max_items: 100
interval: 3600
METHODS
feature_name
throttle
send_request
SEE ALSO
Gungho::Component::Throttle::Simple Gungho::Component::Throttle::Domain
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 3:
Non-ASCII character seen before =encoding in 'スãƒãƒƒãƒˆãƒªãƒ³ã‚°ç”¨ãƒ™ãƒ¼ã‚¹ã‚¯ãƒ©ã‚¹'. Assuming CP1252