Welcome! Log In Create A New Profile

Advanced

Re: try_files random

Валентин Бартенев
July 20, 2012 06:20PM
On Friday 20 July 2012 19:36:18 arty777 wrote:
> location ~ ^/media(.+)$ {
> root /raid;
>
> try_files
> /raid1$1
> /raid2$1
> /raid3$1
> /raid4$1
> /raid5$1
> /raid6$1
> /raid7$1
> /raid8$1
> /ssd1$1
>
> =404;
>

split_clients "1$date_gmt$remote_addr" $v1 {
12.5% /raid1;
12.5% /raid2;
12.5% /raid3;
12.5% /raid4;
12.5% /raid5;
12.5% /raid6;
12.5% /raid7;
12.5% /raid8;
}

split_clients "2$date_gmt$remote_addr" $v2 {
12.5% /raid1;
12.5% /raid2;
12.5% /raid3;
12.5% /raid4;
12.5% /raid5;
12.5% /raid6;
12.5% /raid7;
12.5% /raid8;
}

...

split_clients "8$date_gmt$remote_addr" $v8 {
12.5% /raid1;
12.5% /raid2;
12.5% /raid3;
12.5% /raid4;
12.5% /raid5;
12.5% /raid6;
12.5% /raid7;
12.5% /raid8;
}


server {
location ~ ^/media(.+)$ {
try_files $v1$1 $v2$1 $v3$1 $v4$1 $v5$1 $v6$1 $v7$1 $v8$1
/ssd1$1 =404;
}
}

Но лучше все-таки данные по дискам распределять не рандомно, а по определенному
правилу.

--
Валентин Бартенев

_______________________________________________
nginx-ru mailing list
nginx-ru@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru
Subject Author Posted

try_files random

arty777 July 20, 2012 11:36AM

Re: try_files random

Andrey Repin July 20, 2012 12:52PM

Re: try_files random

arty777 July 20, 2012 02:08PM

Re: try_files random

arty777 July 20, 2012 03:40PM

Re: try_files random

arty777 July 21, 2012 11:25AM

Re: try_files random

arty777 July 21, 2012 02:21PM

Re: try_files random

arty777 July 23, 2012 08:46AM

Re: try_files random

arty777 July 23, 2012 08:48AM

Re: try_files random

arty777 July 23, 2012 10:22AM

Re: try_files random

arty777 July 23, 2012 12:43PM

Re: try_files random

arty777 July 23, 2012 01:28PM

Re: try_files random

arty777 July 23, 2012 01:51PM

Re: try_files random

arty777 July 23, 2012 03:22PM

Re: try_files random

Dmitry Y. Labutin July 20, 2012 02:38PM

Re: try_files random

Alexandr Gomoliako July 20, 2012 04:14PM

Re: try_files random

arty777 July 20, 2012 04:30PM

Re: try_files random

Alexandr Gomoliako July 20, 2012 05:16PM

Re: try_files random

Валентин Бартенев July 20, 2012 06:20PM

Re: try_files random

Валентин Бартенев July 20, 2012 06:24PM

Re: try_files random

Alexandr Gomoliako July 20, 2012 06:44PM

Re: try_files random

Alexandr Gomoliako July 21, 2012 12:48PM

Re: try_files random

Alexandr Gomoliako July 23, 2012 10:02AM

Re: try_files random

Alexandr Gomoliako July 23, 2012 11:00AM

Re: try_files random

Alexandr Gomoliako July 23, 2012 01:14PM

Re: try_files random

Alexandr Gomoliako July 23, 2012 01:42PM

Re: try_files random

Alexandr Gomoliako July 23, 2012 03:18PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 259
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready