Guest User

Untitled

a guest
Jun 18th, 2018
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.72 KB | None | 0 0
  1. From: "Dawid Sieradzki / Gadu-Gadu S.A." <dawid.sieradzki@gxxx-gxxx.pl>
  2. To: "haproxy@formilux.org" <haproxy@formilux.org>
  3. Subject: realtime switch to another backend if got 5xx error?
  4. Message-ID: <4A155FA8.9000602@gadu-gadu.pl>
  5. Date: Thu, 21 May 2009 16:05:28 +0200
  6. User-Agent: Thunderbird 2.0.0.21 (Windows/20090302)
  7.  
  8. Hi.
  9.  
  10. The problem is how to silent switch to another backend in realtime if
  11. got 500 answer from backend, without http_client knowledge
  12. Yes i know, httpchk, but the error 500 is 10 per hour, we don't know
  13. when and why.
  14. So, it is a race who get 500 first - httpchk or http_client.
  15.  
  16. If You don't know what i mean:
  17.  
  18. example config:
  19.  
  20. ----8<--------
  21.  
  22. frontend
  23. (..)
  24. default_backend back_1
  25.  
  26. backend back_1
  27. option httpchk GET /index.php HTTP/1.1\r\nHost:\ test.pl
  28. mode http
  29. retries 10
  30. balance roundrobin
  31.  
  32. server chk1 127.0.0.1:81 weight 1 check
  33. server chk2 127.0.0.1:82 weight 1 check
  34. server chk3 127.0.0.1:83 weight 1 check backup
  35.  
  36. ---->8----------
  37.  
  38. http_client -> haproxy -> (backend1|backend2|backend3)
  39.  
  40. let's go inside request:
  41.  
  42. A. haproxy recived request from http_client
  43. B. haproxy sent request from http_client to backend1
  44. C. backend1 said 500 internal server error
  45.  
  46. I want: :-)
  47. D. haproxy sent request from_http to backend2 (or backup backend or
  48. another one, or one more time to backend1)
  49.  
  50. I have: :-(
  51. D. haproxy sent 500 internal server error to http_client from backend1
  52. E. haproxy will mark backend1 as down if got 2 > errror 500 from backend1
  53.  
  54.  
  55. It is possible to do that?
  56.  
  57.  
  58. Thank You
  59.  
  60. /Dawid Sieradzki
Add Comment
Please, Sign In to add comment