HWLoadbalancerCheckErrors

Some Hardware Load-balancers such Cisco's CSS and BigIP Products test the readiness of the backend Machines with SYN-ACK-RST.

This behavior causes a 400 error in nginx.

With the GEO Module and the if-Statement you can omit these entries:

  1. http {
  2. geo $lb {
  3. default 0;
  4. 10.1.1.1/32 1; # LB IPs
  5. 10.1.1.2/32 1;
  6. }
  7. # ...
  8. server {
  9. # ...
  10. access_log /path/to/log;
  11. error_page 400 /400;
  12. location = /400 {
  13. if ($lb) {
  14. access_log off;
  15. }
  16. return 400;
  17. }
  18. }
  19. }