ПРОЕКТЫ 


  АРХИВ 


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]

проблема с upstream_hash


  • To: nginx-ru@xxxxxxxxx
  • Subject: проблема с upstream_hash
  • From: Konstantin Svist <fry.kun@xxxxxxxxx>
  • Date: Fri, 22 Jun 2012 13:38:42 -0700
  • Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=pHZ7SAn9uMWg8ULiU4fpw2yOaqcUOYxCmra76zkemtI=; b=oGPGBMxJAiDf2VApkuWbDH+3shd4Kp4eOQ+HdH8AAvklQ2R+1mUjjrkTVQI20nLbXt LEXXUndP4SJ/IVsCZdAySXGyE3ON3z9rxQEvVQBQLc4FQLRtYU1dkCVRwACi/h6DLm4w iiuXFv4x+arhC0cx3gCbjgXXYdLP1PWN0ZyEi0V9VdRIgr9PpCKtbaNuOAO93WW41TqG 3O/ovY24f1gIxzxPT9NTF9Mu+CW163/VuUfdslu/hYfAeinJoywyhuzkpZWMbpQy5vWg HaylhkaMF2chFFAeZJcsTnnQ1CAMJ8KYKJTIMlFtNw/L9S+pit3VWtUKEl5NwYaya/0B xPcQ==

Баг: если в списке upstream есть хосты с IP адресом 127.0.0.1 то upstream_hash работает неправильно.

Понятно что это 3rd party plugin, но в его коде нету ничего подозрительного - скорее nginx что-то хитро оптимизирует...


upstream  cl1  {
        hash        $arg_key;
        hash_again  10;
        server  srv1:6381;
        server  srv1:6411;
        server  srv1:6436;
        server  srv1:6437;
        server  srv2:6381;
        server  srv2:6411;
        server  srv2:6436;
        server  srv2:6437;
    }

Запрос на srv1:

2012/06/22 12:00:00 [debug] 11111#0: *1234567890 http script var: "3197dc0f345aae7132ab1e3b432ddb00" 2012/06/22 12:00:00 [debug] 11111#0: *1234567890 upstream_hash: hashed "3197dc0f345aae7132ab1e3b432ddb00" to 3 2012/06/22 12:00:00 [debug] 11111#0: *1234567890 upstream_hash: Starting with 3 2012/06/22 12:00:00 [debug] 11111#0: *1234567890 upstream_hash: get upstream request hash peer try 10 2012/06/22 12:00:00 [debug] 11111#0: *1234567890 upstream_hash: chose peer 3 w/ hash 19143 for tries 10

Запрос на любом другом хосте:

2012/06/22 12:00:00 [debug] 11111#0: *1234567890 http script var: "3197dc0f345aae7132ab1e3b432ddb00" 2012/06/22 12:00:00 [debug] 11111#0: *1234567890 upstream_hash: hashed "3197dc0f345aae7132ab1e3b432ddb00" to 7 2012/06/22 12:00:00 [debug] 11111#0: *1234567890 upstream_hash: Starting with 7 2012/06/22 12:00:00 [debug] 11111#0: *1234567890 upstream_hash: get upstream request hash peer try 10 2012/06/22 12:00:00 [debug] 11111#0: *1234567890 upstream_hash: chose peer 7 w/ hash 19143 for tries 10


_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://mailman.nginx.org/mailman/listinfo/nginx-ru


 




Copyright © Lexa Software, 1996-2009.