nginx redisiza lotes de TIME_WAIT para alguns servidores depois de adicionar um novo grupo ao upstream

1

Eu tenho nginx upstream de servidores redis (5 servidores com 4 instâncias de redis em cada) como segue:

upstream redis_cluster {

    server 10.0.1.8:6379 fail_timeout=0;    
    server 10.0.1.8:6380 fail_timeout=0;    
    server 10.0.1.8:6381 fail_timeout=0;   
    server 10.0.1.8:6382 fail_timeout=0;

    server 10.0.1.6:6379 fail_timeout=0;   
    server 10.0.1.6:6380 fail_timeout=0;   
    server 10.0.1.6:6381 fail_timeout=0;   
    server 10.0.1.6:6382 fail_timeout=0;

    ...

keepalive 16;

}

Depois de adicionar o último servidor (as 4 últimas instâncias de redis, na verdade), notei que conexões estranhas se originam em algumas delas:

   9684 10.0.0.17:6379 TIME_WAIT
      3 10.0.0.17:6380 ESTABLISHED
   9677 10.0.0.17:6380 TIME_WAIT
   9664 10.0.0.17:6381 TIME_WAIT
      6 10.0.0.17:6382 ESTABLISHED
   9660 10.0.0.17:6382 TIME_WAIT
      4 10.0.1.3:6379 ESTABLISHED
      1 10.0.1.3:6379 SYN_SENT
   9671 10.0.1.3:6379 TIME_WAIT
      3 10.0.1.3:6380 ESTABLISHED
   9665 10.0.1.3:6380 TIME_WAIT
      1 10.0.1.3:6381 ESTABLISHED
   9661 10.0.1.3:6381 TIME_WAIT
      5 10.0.1.3:6382 ESTABLISHED
   9660 10.0.1.3:6382 TIME_WAIT
      5 10.0.0.7:6379 ESTABLISHED
   9653 10.0.0.7:6379 TIME_WAIT
      4 10.0.0.7:6380 ESTABLISHED
   9663 10.0.0.7:6380 TIME_WAIT
      1 10.0.0.7:6381 ESTABLISHED
   9664 10.0.0.7:6381 TIME_WAIT
      7 10.0.0.7:6382 ESTABLISHED
   9667 10.0.0.7:6382 TIME_WAIT
      5 10.0.1.8:6379 ESTABLISHED
   9673 10.0.1.8:6379 TIME_WAIT
      2 10.0.1.8:6380 ESTABLISHED
   9676 10.0.1.8:6380 TIME_WAIT
      4 10.0.1.8:6381 ESTABLISHED
   9665 10.0.1.8:6381 TIME_WAIT
      3 10.0.1.8:6382 ESTABLISHED

Depois de comentar um último servidor (as últimas 4 entradas do upstream), tudo voltou ao normal:

  4 10.0.0.10:6379 ESTABLISHED
  4 10.0.0.10:6380 ESTABLISHED
  4 10.0.0.10:6381 ESTABLISHED
  1 10.0.0.10:6381 TIME_WAIT
  4 10.0.0.10:6382 ESTABLISHED
  4 10.0.1.3:6379 ESTABLISHED
  4 10.0.1.3:6380 ESTABLISHED
  4 10.0.1.3:6381 ESTABLISHED
  4 10.0.1.3:6382 ESTABLISHED
  4 10.0.0.7:6379 ESTABLISHED
  4 10.0.0.7:6380 ESTABLISHED
  4 10.0.0.7:6381 ESTABLISHED
  4 10.0.0.7:6382 ESTABLISHED
  4 10.0.1.8:6379 ESTABLISHED
  4 10.0.1.8:6380 ESTABLISHED
  4 10.0.1.8:6381 ESTABLISHED
  4 10.0.1.8:6382 ESTABLISHED

Qual poderia ser a causa disso? Obrigado antecipadamente, camaradas.

    
por cardinal-gray 25.11.2016 / 16:45

0 respostas

Tags