# Multiple $mogilefs\_path variables

**URL:** <https://www.ruby-forum.com/t/multiple-mogilefs-path-variables/184630>\
**Category:** NGINX\
**Created:** [March 5, 2010, 12:58pm UTC](https://www.ruby-forum.com/t/multiple-mogilefs-path-variables/184630 "2010-03-05T12:58:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Valery\_K](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/ee7513/32.png) [@Valery\_K](https://www.ruby-forum.com/u/Valery_K)\
**Post date:** [March 5, 2010, 12:58pm UTC](https://www.ruby-forum.com/t/multiple-mogilefs-path-variables/184630/1 "2010-03-05T12:58:17Z")

</div>

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.
