-
Notifications
You must be signed in to change notification settings - Fork 1
/
README
110 lines (73 loc) · 3.74 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
This is Perl module Perlbal::Plugin::MogileFS.
INSTALLATION
Perlbal::Plugin::MogileFS installation is straightforward. If your CPAN shell is set up,
you should just be able to do
% cpan Perlbal::Plugin::MogileFS
Download it, unpack it, then build it as per the usual:
% perl Makefile.PL
% make && make test
Then install it:
% make install
DOCUMENTATION
Perlbal::Plugin::MogileFS documentation is available as in POD. So you can do:
% perldoc Perlbal::Plugin::MogileFS
Depending on what implementation your using.
This plugin provides Perlbal the ability to serve data out of MogileFS. Perlbal::Plugin::MogileFS defaults to asynchronous request handling so it handles slow trackers gracefully without blocking the main event loop.
URL paths are converted to ':' delimited MogileFS keys. For example, '/video/10/default.jpg' is converted to 'video:10:default.jpg'. You can change the way keys are hashed by modifying the url_to_key function. Future releases will support URL to Key conversions to be setup in the Perlbal configuration.
Configuration as follows:
See sample/perlbal.conf
-- Required Configuration Options
MOGILEFS domain = <domain name>
- Default: none
- The default MogileFS domain to use for the service.
MOGILEFS trackers = <serv1:6001,serv2:6001>
- Default: none
- List of trackers comma delimited.
-- Optional Configuration options
MOGILEFS async = <on/off>
- Default: on
- If to use asynchronous processing to avoid blocking the event loop. Defaults to true.
MOGILEFS etag = <on/off>
- Default: on
- If to generate an ETag with the response. Defaults to true.
MOGILEFS fallback = <on/off>
- Default: off
- Should Perlbal try the filesystem docroot if MogileFS key lookup fails.
MOGILEFS noverify = <on/off>
- Default: on
- If to verify mogstored paths on path retrieval. Let Perlbal handle this
asynchronously during content delivery time. Defaults to true.
MOGILEFS max_recent = <int>
- Default: 100
- Max amount of fetch records to keep for statistics. Defaults to 100.
MOGILEFS max_miss = <int>
- Default: 100
- Max amount of fetch records to keep for MISS statistics. Defaults to 100.
MOGILEFS retries = <int>
- Default: 3
- Max amount of retries on broken mogilefs tracker socket. Defaults to 3.
MOGILEFS cache_control = <string>
- Default: off
- Suggested: max-age=2592000
- Cache-Control headers appended to responses on HIT for forward caching proxies.
It is recommended to have squid or varnish in front.
MANAGEMENT COMMANDS
Telnet into your Perlbal management interface that is normally configured on port 60000.
mogilefs_stats Fetch statistics for all mogilefs web services served by this perlbal instance.
mogilelookup mogilefs_hits 14
mogilelookup mogilefs_misses 12
mogilelookup mogilefs_requests 26
total mogilefs_hits 14
total mogilefs_misses 12
total mogilefs_requests 26
mogilefs_recent Fetch recent keys tried with MISS/HIT information. See which keys fail.
mogilelookup MISS photo:13936:ron-and-jan.tif:640
mogilelookup MISS favicon.ico
mogilelookup MISS photo:13936:ron-and-jan.tif:640
mogilelookup HIT video:100:default.jpg
mogilelookup HIT video:799:default.jpg:130
mogilefs_misses Fetch recent keys that came back as a MISS. See which keys fail.
mogilelookup MISS photo:13936:ron-and-jan.tif:640
mogilelookup MISS favicon.ico
mogilelookup MISS photo:13936:ron-and-jan.tif:640
- Victor Igumnov