ПРОЕКТЫ 


  АРХИВ 


Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 


  СТАТЬИ 


  ПЕРСОНАЛЬНОЕ 


  ПРОГРАММЫ 



ПИШИТЕ
ПИСЬМА












     АРХИВ :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Вопрос по перебору бэкендов


  • To: nginx-ru@xxxxxxxxx
  • Subject: Вопрос по перебору бэкендов
  • From: Михаил Монашёв <postmaster@xxxxxxxxxxxxx>
  • Date: Sat, 21 Feb 2009 00:57:01 +0300
  • Organization: SoftSearch.ru

Здравствуйте.

Заметил в логах вот такие строчки:

20/Feb/2009:21:06:23 +0300 502 "502, 502, 502, 502, 502, 502, 502, 502, 502, 
502, 502, 502, 502, 502, 502, 502, 502, 502, 502, 502, 502, 502, 502, 502, 502, 
502, 502, 502, 502, 502, 502, 502, 502, 502, 502, 502, 502, 502, 502, 502, 502, 
502, 502, 502, 502, 502, 502, 502, 502, 502, 502, 502, 502, 502, 502, 502, 502, 
502, 502, 502, 502, 502, 502, 502, 502, 502, 502" 0.052 "0.001, 0.001, 0.000, 
0.005, 0.001, 0.000, 0.001, 0.000, 0.001, 0.004, 0.001, 0.000, 0.001, 0.000, 
0.001, 0.003, 0.000, 0.001, 0.000, 0.001, 0.000, 0.003, 0.001, 0.000, 0.000, 
0.001, 0.000, 0.002, 0.001, 0.000, 0.000, 0.001, 0.000, 0.001, 0.001, 0.000, 
0.001, 0.000, 0.001, 0.000, 0.001, 0.000, 0.001, 0.000, 0.000, 0.001, 0.001, 
0.000, 0.001, 0.000, 0.002, 0.000, 0.001, 0.000, 0.001, 0.001, 0.001, 0.000, 
0.001, 0.000, 0.001, 0.001, 0.001, 0.000, 0.001, 0.000, 0.001" "1.2.3.6:80, 
1.2.3.7:80, 1.2.3.8:80, 1.2.3.5:80, 1.2.3.4:80, 127.0.1.8:80, 1.2.3.6:80, 
1.2.3.7:80, 1.2.3.8:80, 1.2.3.5:80, 1.2.3.4:80, 127.0.1.8:80, 1.2.3.6:80, 
1.2.3.7:80, 1.2.3.8:80, 1.2.3.5:80, 1.2.3.4:80, 127.0.1.8:80, 1.2.3.6:80, 
1.2.3.7:80, 1.2.3.8:80, 1.2.3.5:80, 1.2.3.4:80, 127.0.1.8:80, 1.2.3.6:80, 
1.2.3.7:80, 1.2.3.8:80, 1.2.3.5:80, 1.2.3.4:80, 127.0.1.8:80, 1.2.3.6:80, 
1.2.3.7:80, 1.2.3.8:80, 1.2.3.5:80, 1.2.3.4:80, 127.0.1.8:80, 1.2.3.6:80, 
1.2.3.7:80, 1.2.3.8:80, 1.2.3.5:80, 1.2.3.4:80, 127.0.1.8:80, 1.2.3.6:80, 
1.2.3.7:80, 1.2.3.8:80, 1.2.3.5:80, 1.2.3.4:80, 1.2.3.6:80, 1.2.3.7:80, 
1.2.3.8:80, 1.2.3.5:80, 1.2.3.4:80, 1.2.3.6:80, 1.2.3.7:80, 1.2.3.8:80, 
1.2.3.5:80, 1.2.3.4:80, 1.2.3.6:80, 1.2.3.7:80, 1.2.3.8:80, 1.2.3.5:80, 
1.2.3.4:80, 1.2.3.5:80, 1.2.3.6:80, 1.2.3.7:80, 1.2.3.8:80, 1.2.3.4:80" 
84.42.151.118 354 narutolee.beon.ru "GET / HTTP/1.1" 
"http://images.google.com/imgres?imgurl=http://i61.beon.ru/11/41/94111/92/4044992/461049Naruto_x_Hinata___Rasengan_by_Pia_sama.jpeg&imgrefurl=http://narutolee.beon.ru/&usg=__6dzK7SqWZFVi_5lYbUu2XFwJI0A=&h=366&w=300&sz=39&hl=ru&start=49&um=1&tbnid=8KiGppQD0L0zsM:&tbnh=122&tbnw=100&prev=/images%3Fq%3Dnaruto%26start%3D40%26ndsp%3D20%26um%3D1%26hl%3Dru%26sa%3DN";
 "Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.6) Gecko/2009011913 
Firefox/3.0.6"

20/Feb/2009:21:06:31 +0300 502 "502, 502, 502, 502, 502, 502, 502, 502, 502, 
502, 502, 502, 502, 502, 502, 502, 502, 502, 502, 502, 502, 502, 502, 502, 502, 
502, 502, 502, 502, 502, 502, 502, 502, 502, 502, 502, 502, 502, 502, 502, 502, 
502, 502, 502, 502, 502, 502, 502, 502, 502, 502, 502, 502, 502, 502, 502, 502, 
502, 502, 502, 502, 502, 502, 502, 502, 502, 502, 502, 502, 502, 502, 502, 502, 
502, 502, 502, 502, 502, 502, 502, 502, 502, 502, 502, 502, 502, 502, 502, 502, 
502, 502, 502, 502, 502, 502, 502, 502" 0.065 "0.001, 0.000, 0.001, 0.002, 
0.000, 0.000, 0.001, 0.000, 0.001, 0.002, 0.000, 0.000, 0.001, 0.000, 0.001, 
0.002, 0.001, 0.000, 0.000, 0.001, 0.000, 0.002, 0.000, 0.000, 0.001, 0.000, 
0.001, 0.002, 0.000, 0.000, 0.001, 0.001, 0.000, 0.002, 0.001, 0.000, 0.000, 
0.001, 0.000, 0.002, 0.000, 0.001, 0.000, 0.001, 0.000, 0.002, 0.001, 0.000, 
0.000, 0.001, 0.000, 0.002, 0.001, 0.000, 0.000, 0.001, 0.000, 0.002, 0.001, 
0.000, 0.001, 0.000, 0.001, 0.002, 0.001, 0.000, 0.001, 0.000, 0.001, 0.002, 
0.000, 0.000, 0.001, 0.000, 0.000, 0.002, 0.001, 0.000, 0.001, 0.000, 0.001, 
0.000, 0.001, 0.000, 0.001, 0.001, 0.000, 0.001, 0.000, 0.001, 0.001, 0.000, 
0.001, 0.000, 0.001, 0.000, 0.001" "1.2.3.6:80, 1.2.3.7:80, 1.2.3.8:80, 
1.2.3.5:80, 1.2.3.4:80, 127.0.1.8:80, 1.2.3.6:80, 1.2.3.7:80, 1.2.3.8:80, 
1.2.3.5:80, 1.2.3.4:80, 127.0.1.8:80, 1.2.3.6:80, 1.2.3.7:80, 1.2.3.8:80, 
1.2.3.5:80, 1.2.3.4:80, 127.0.1.8:80, 1.2.3.6:80, 1.2.3.7:80, 1.2.3.8:80, 
1.2.3.5:80, 1.2.3.4:80, 127.0.1.8:80, 1.2.3.6:80, 1.2.3.7:80, 1.2.3.8:80, 
1.2.3.5:80, 1.2.3.4:80, 127.0.1.8:80, 1.2.3.6:80, 1.2.3.7:80, 1.2.3.8:80, 
1.2.3.5:80, 1.2.3.4:80, 127.0.1.8:80, 1.2.3.6:80, 1.2.3.7:80, 1.2.3.8:80, 
1.2.3.5:80, 1.2.3.4:80, 127.0.1.8:80, 1.2.3.6:80, 1.2.3.7:80, 1.2.3.8:80, 
1.2.3.5:80, 1.2.3.4:80, 127.0.1.8:80, 1.2.3.6:80, 1.2.3.7:80, 1.2.3.8:80, 
1.2.3.5:80, 1.2.3.4:80, 127.0.1.8:80, 1.2.3.6:80, 1.2.3.7:80, 1.2.3.8:80, 
1.2.3.5:80, 1.2.3.4:80, 127.0.1.8:80, 1.2.3.6:80, 1.2.3.7:80, 1.2.3.8:80, 
1.2.3.5:80, 1.2.3.4:80, 127.0.1.8:80, 1.2.3.6:80, 1.2.3.7:80, 1.2.3.8:80, 
1.2.3.5:80, 1.2.3.4:80, 127.0.1.8:80, 1.2.3.6:80, 1.2.3.7:80, 1.2.3.8:80, 
1.2.3.5:80, 1.2.3.4:80, 1.2.3.6:80, 1.2.3.7:80, 1.2.3.8:80, 1.2.3.5:80, 
1.2.3.4:80, 1.2.3.6:80, 1.2.3.7:80, 1.2.3.8:80, 1.2.3.5:80, 1.2.3.4:80, 
1.2.3.6:80, 1.2.3.7:80, 1.2.3.8:80, 1.2.3.5:80, 1.2.3.4:80, 1.2.3.5:80, 
1.2.3.6:80, 1.2.3.7:80, 1.2.3.8:80, 1.2.3.4:80" 92.112.23.162 354 279.beon.ru 
"GET /54-095-test-dlja-devochek-anna-tochno.zhtml HTTP/1.1" 
"http://yandex.ru/yandsearch?text=%D0%BE%D0%BD%D0%BB%D0%B0%D0%B9%D0%BD+%D0%B8%D0%B3%D1%80%D1%8B+%D0%B4%D0%BB%D1%8F+%D0%B4%D0%B5%D0%B2%D0%BE%D1%87%D0%B5%D0%BA+%D0%BD%D0%B0+%D0%BF%D0%BE%D1%86%D0%B5%D0%BB%D1%83%D0%B8&stpar2=%2Fh1%2Ftm29%2Fs4&stpar4=%2Fs4&stpar1=%2Fu1&stpar3=%2Fm4%2Ftc34%2Fnc1&lr=187";
 "Opera/9.62 (Windows NT 5.1; U; ru) Presto/2.1.1"

Конфигурация апстрима вот такая:

        upstream  my_backends  {
                server  127.0.1.8:80    weight=1        max_fails=20    
fail_timeout=3s;
                server  1.2.3.4:80   weight=5000     max_fails=1000  
fail_timeout=3s;
                server  1.2.3.5:80   weight=10000    max_fails=1000  
fail_timeout=3s;
                server  1.2.3.6:80   weight=16000    max_fails=1000  
fail_timeout=3s;
                server  1.2.3.7:80   weight=16000    max_fails=1000  
fail_timeout=3s;
                server  1.2.3.8:80   weight=16000    max_fails=1000  
fail_timeout=3s;
                server  1.2.3.4:80   backup;
                server  1.2.3.5:80   backup;
                server  1.2.3.6:80   backup;
                server  1.2.3.7:80   backup;
                server  1.2.3.8:80   backup;
        }

Я   правильно   понимаю,   что  апстрим  знает  только  про  последний
запрошенный  бэкенд и может отправлять один запрос по кругу даже на те
бэкенды, которые ранее на него вернули ошибку?


С уважением,
Михаил Монашёв, SoftSearch.ru
mailto:postmaster@xxxxxxxxxxxxx
ICQ# 166233339
http://michael.mindmix.ru/
Без бэкапа по жизни.




 




Copyright © Lexa Software, 1996-2009.