title: How to enable keep-alive in haproxy?
body: <p>This is my haproxy.conf (haproxy 1.7.9)</p>
  
  <pre><code>global
      log             127.0.0.1 local0
  defaults
      retries 3
      option redispatch
      timeout client  30s
      timeout connect 30s
      timeout server  30s
      option http-keep-alive
      http-reuse always
  
  frontend web1
      bind *:8080
      option http-keep-alive
      mode http
      default_backend app1
  backend app1
      balance     roundrobin
      option http-keep-alive
      mode http
      server a2 192.168.56.150:8000
  </code></pre>
  
  <p>curl result of origin server:</p>
  
  <pre><code>$ curl -vv http://192.168.56.150:8000/test --keepalive-time 700
  * About to connect() to 192.168.56.150 port 8000 (#0)
  *   Trying 192.168.56.150...
  * Connected to 192.168.56.150 (192.168.56.150) port 8000 (#0)
  &gt; GET /test HTTP/1.1
  &gt; User-Agent: curl/7.29.0
  &gt; Host: 192.168.56.150:8000
  &gt; Accept: */*
  &gt; 
  &lt; HTTP/1.1 200 OK 
  &lt; Etag: 720-6-59eeda80
  &lt; Content-Type: application/octet-stream
  &lt; Content-Length: 6
  &lt; Last-Modified: Tue, 24 Oct 2017 06:15:28 GMT
  &lt; Server: WEBrick/1.3.1 (Ruby/2.0.0/2015-12-16)
  &lt; Date: Fri, 27 Oct 2017 02:38:14 GMT
  &lt; Connection: Keep-Alive
  &lt; 
  tests
  * Connection #0 to host 192.168.56.150 left intact
  </code></pre>
  
  <p>curl result of haproxy server</p>
  
  <pre><code>$ curl -vv http://192.168.56.150:8080/test --keepalive-time 700
  * About to connect() to 192.168.56.150 port 8080 (#0)
  *   Trying 192.168.56.150...
  * Connected to 192.168.56.150 (192.168.56.150) port 8080 (#0)
  &gt; GET /test HTTP/1.1
  &gt; User-Agent: curl/7.29.0
  &gt; Host: 192.168.56.150:8080
  &gt; Accept: */*
  &gt; 
  &lt; HTTP/1.1 200 OK 
  &lt; Etag: 720-6-59eeda80
  &lt; Content-Type: application/octet-stream
  &lt; Content-Length: 6
  &lt; Last-Modified: Tue, 24 Oct 2017 06:15:28 GMT
  &lt; Server: WEBrick/1.3.1 (Ruby/2.0.0/2015-12-16)
  &lt; Date: Fri, 27 Oct 2017 02:38:05 GMT
  &lt; 
  tests
  * Connection #0 to host 192.168.56.150 left intact
  </code></pre>
  
  <p>And I confirmed by <code>tcpdump</code> that there is <code>Connection: Keep-Alive</code> in the response from origin to haproxy</p>
  
  <p>As you can see, there's no <code>Connection: Keep-Alive</code> in haproxy response, how can I make haproxy keep-alive??</p>