Skip to content
Snippets Groups Projects
  1. Aug 13, 2018
  2. Mar 24, 2018
    • Alex Ellis (VMware)'s avatar
      Add feature for graceful shutdown of HTTP server · de2c74fc
      Alex Ellis (VMware) authored
      If the watchdog is sent SIGTERM from an external process then it
      should stop accepting new connections and attempt to finish the
      work in progress. This change makes use of the new ability in Go
      1.9 and onwards to cancel a HTTP server gracefully.
      
      The write_timeout duration is used as a grace period to allow all
      in-flight requests to complete. The pattern is taken directly from
      the offical example in the Golang documentation. [1]
      
      Further tuning and testing may be needed for Windows containers which
      have a different set of signals for closing work. This change aims
      to cover the majority use-case for Linux containers.
      
      The HTTP health-check is also invalidated by creating an and
      expression with the existing lock file.
      
      Tested with Kubernetes by deploying a custom watchdog and the
      fprocess of `env`. Log message was observed when scaling down and
      connections stopped being accepted on terminating replica.
      
      Also corrects some typos from previous PR.
      
      [1] https://golang.org/pkg/net/http/#Server.Shutdown
      
      
      
      Signed-off-by: default avatarAlex Ellis (VMware) <alexellis2@gmail.com>
      de2c74fc
  3. Mar 23, 2018
  4. Mar 20, 2018
  5. Mar 17, 2018
  6. Oct 29, 2017
  7. Sep 13, 2017
  8. Aug 23, 2017
  9. Jul 07, 2017
    • Alex Ellis's avatar
      Watchdog refurbishments · 4d058967
      Alex Ellis authored
      
      - Watchdog - allow new methods with and without body.
      - Enforce hard-timeout via exec_timeout variable.
      - Correct bug in timeouts for read/write of HTTP.
      - Documentation for new verbs and hard timeout.
      
      Signed-off-by: default avatarAlex Ellis <alexellis2@gmail.com>
      4d058967
  10. May 09, 2017
  11. May 03, 2017
  12. Apr 27, 2017
  13. Jan 24, 2017
Loading