Welcome! Log In Create A New Profile

Advanced

[PATCH] multiple $mogilefs_path variables

Valery Kholodkov
March 05, 2010 07:06AM
Greetings!

This patch for nginx mogilefs module implements multiple $mogilefs_path variables.

They names are $mogilefs_path, $mogilefs_path1 ... $mogilefs_path9

This allows to implement failover in nginx when a storage node fails.

Example:

location /download/ {
[...]

mogilefs_noverify on;
mogilefs_pass {
proxy_pass $mogilefs_path;
proxy_buffering off;
error_page 502 503 504 = @failover1;
}
}

location @failover1 {
if($mogilefs_path1 = "") {
return 503;
}

proxy_pass $mogilefs_path1;
proxy_buffering off;
error_page 502 503 504 = @failover2;
}

location @failover2 {
if($mogilefs_path2 = "") {
return 503;
}

proxy_pass $mogilefs_path2;
proxy_buffering off;

[ ... and so on ... ]
}

When mogilefs_noverify on directive is accompanied with such configuration, MogileFS tracker will be able to return paths to file without verifying storage node's live status, which theoretically makes it reply faster.

It will be nice if someone can test it.

--
Regards,
Valery Kholodkov_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

[PATCH] multiple $mogilefs_path variables

Valery Kholodkov March 05, 2010 07:06AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 197
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready