Advertisement
cetex

Untitled

Nov 29th, 2018
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.61 KB | None | 0 0
  1. global
  2. log /dev/log len 65535 local0 info alert
  3. log /dev/log len 65535 local1 notice alert
  4. user haproxy
  5. group haproxy
  6. nbproc 1
  7. nbthread 1
  8. maxconn 100000
  9. hard-stop-after 600s # After 10 minutes (clean soft-stop on reloads for mostly tcp connections)
  10. stats socket /var/run/haproxy.sock mode 660 level admin
  11. # server-state-file /var/lib/haproxy/server-state
  12. stats timeout 2m # Wait up to 2 minutes for input
  13. master-worker # Launches one master process and a number of additional worker processes
  14.  
  15. defaults
  16. log global
  17. mode http
  18. option httplog
  19. timeout connect 3s
  20. timeout client 30s
  21. timeout server 30s
  22. timeout http-request 30s
  23. timeout http-keep-alive 60s
  24. timeout queue 120s
  25. timeout check 10s
  26. retries 20 # Max retry attempts on a single server during connect failures
  27. option redispatch 3 # Allow the redispatch to another server on every Xth retry
  28. option forwardfor # Forward request headers from the original client to the backend
  29. # load-server-state-from-file global
  30. default-server init-addr last,none fastinter 1s rise 2 downinter 1s fall 2 on-error fastinter # Skip DNS resolution on startup (lazy resolution) and aggressive health checking
  31. no option http-server-close # keep backend connections alive
  32. option tcp-smart-connect
  33. option tcp-smart-accept
  34. option splice-auto
  35. errorfile 400 /etc/haproxy/errors/400.http
  36. errorfile 403 /etc/haproxy/errors/403.http
  37. errorfile 408 /etc/haproxy/errors/408.http
  38. errorfile 500 /etc/haproxy/errors/500.http
  39. errorfile 502 /etc/haproxy/errors/502.http
  40. errorfile 503 /etc/haproxy/errors/503.http
  41. errorfile 504 /etc/haproxy/errors/504.http
  42.  
  43.  
  44. backend myservice
  45. mode http
  46. option allbackups
  47. balance uri
  48. hash-type consistent djb2
  49. hash-balance-factor 150
  50. server myservice-us-east-1a-1 10.3.72.7:3405 maxconn 200 check backup
  51. server myservice-us-east-1a-2 10.3.72.7:3406 maxconn 200 check backup
  52. server myservice-us-east-1a-3 10.3.72.7:3409 maxconn 200 check backup
  53. server myservice-us-east-1a-4 10.3.72.7:3410 maxconn 200 check backup
  54. server myservice-us-east-1a-5 10.3.74.86:3170 maxconn 200 check backup
  55. server myservice-us-east-1a-6 10.3.74.86:3171 maxconn 200 check backup
  56. server myservice-us-east-1a-7 10.3.74.86:3172 maxconn 200 check backup
  57. server myservice-us-east-1a-8 10.3.74.86:3175 maxconn 200 check backup
  58. server myservice-us-east-1a-9 10.3.78.162:3021 maxconn 200 check backup
  59. server myservice-us-east-1a-10 10.3.78.162:3022 maxconn 200 check backup
  60. server myservice-us-east-1a-11 10.3.78.162:3023 maxconn 200 check backup
  61. server myservice-us-east-1a-12 10.3.78.162:3024 maxconn 200 check backup
  62. server myservice-us-east-1b-13 10.3.85.14:3169 maxconn 200 check
  63. server myservice-us-east-1b-14 10.3.85.14:3171 maxconn 200 check
  64. server myservice-us-east-1b-15 10.3.85.14:3172 maxconn 200 check
  65. server myservice-us-east-1b-16 10.3.93.155:3323 maxconn 200 check
  66. server myservice-us-east-1b-17 10.3.93.155:3324 maxconn 200 check
  67. server myservice-us-east-1b-18 10.3.93.155:3326 maxconn 200 check
  68. server myservice-us-east-1b-19 10.3.93.155:3327 maxconn 200 check
  69. server myservice-us-east-1b-20 10.3.93.44:3018 maxconn 200 check
  70. server myservice-us-east-1b-21 10.3.93.44:3019 maxconn 200 check
  71. server myservice-us-east-1b-22 10.3.93.44:3020 maxconn 200 check
  72. server myservice-us-east-1b-23 10.3.93.44:3024 maxconn 200 check
  73.  
  74. endpoint:/some-request backend:myservice message_type:HTTP request_time:29/Nov/2018:12:57:12.397 host:i-xxxxxyyxxx protocol:http http_status:503 user_agent: unique_id: headers:{||myservice} backend_name:myservice http_method:POST upstream_response_time:-1 upstream_connect_time:-1 bytes_read:213 sconn:0 bconn:0 fconn:1 upstream_addr:10.3.85.14 upstream_port:3168 server_name:myservice-us-east-1b-19 source_addr:10.3.93.44 source_port:13168 retries:20 bytes_uploaded:334 session_duration:20,421 termination_state:SC http_query_params: accept_time:0 idle_time:393 client_time:0 wait_time:18,025 download_time:-1 active_time:20,028 environment_type:prod local_ip:10.3.93.44 cluster:mycluster system_timestamp:November 29th 2018, 13:57:32.000 tags.service:myservice tags.host:i-xxxxxyyxxx tags.cluster:mycluster tags.local_ip:10.3.93.44 logcount:1 @timestamp:November 29th 2018, 13:57:32.818 _id:c2WLX2cBJ-MAGBobzr5y _type:fluentd _index:haproxy-2018.11.29 _score: -
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement