nginx mogilefs module 1.0.1

Michael Shadle mike503 at
Thu Apr 16 20:05:12 MSD 2009

On Thu, Apr 16, 2009 at 5:49 AM, Valery Kholodkov
<valery+nginxen at> wrote:

>> 2. As far as I see it uses only first path returned by mogilefs.
>> Is it planned to support failover?  From my understanding it
>> should be simple, something like
>>     location /mogilefs {
>>         mogilefs_tracker ...
>>         mogilefs_pass  /mogilefs_fetch;
>>     }
>>     location /mogilefs_fetch {
>>         error_page 502 503 504 = @failover;
>>         proxy_pass $mogilefs_path_0;
>>     }
>>     location @failover {
>>         proxy_pass $mogilefs_path_1;
>>     }
> That's actually good idea, I'll implement it. The only thing I'd love to have to do this is access to parametric variables from modules.

There should be no need for multiple $mogilefs_path's as the tracker
supplies the locations that nginx should be proxying to...

However, failover to a non-mogilefs source does make sense. in this
case it would be something like this I think:

error_page 502 503 504 = /maintenance.html;

Or something of that nature?

Remember, mogilefs already has its own intelligence built in for
redundancy. All nginx has to do is take the list of mogstoreds
(storage nodes that listen over http for basic webdav commands, which
can be use nginx for that too :)) and try them in either a) the order
given, b) opposite order or c) random order - the choice should come
from the feedback from dormando or someone knowledgable with the
mogilefs code. I am not sure if the tracker arbitrarily gives a list
of URLs or if there is any context behind it.

More information about the nginx mailing list