~/talk

Production-ready Go

Talkat Golang UK 2017 · 2017-08-16..08-18· [devops-and-delivery]
name:Ian Kent
links:none on file
slides:none on file

Go's net/http defaults are dangerous: the package-level HTTP client lacks a timeout (though Transport sometimes times out) and ListenAndServe omits server timeouts, so untrusted slow clients can exhaust file descriptors; a local demo shows 1.2M requests in 60s at 20k/s and 195µs avg but a ulimit=20 test with a 10bps slow client fills descriptors. Fixes are minimal: set ReadTimeout/WriteTimeout/IdleTimeout on http.Server, handle SIGINT and SIGTERM via signal.Notify, and propagate cancellation with request.Context().Done().

AI-written summary · about

  1. 0:00Intro
  2. 2:15Seriously bad code
  3. 2:28Productionready Go
  4. 2:58Things I wont be talking about
  5. 3:20Easy
  6. 4:40Mistakes
  7. 5:58Client timeouts
  8. 6:27HTTP timeouts
  9. 10:22HTTP server demo
  10. 15:18HTTP server tips
  11. 18:18Operating system signals
  12. 19:21OS signals overview
  13. 21:43Sigmapipe overview
  14. 26:40Cancellation overview
  15. 27:48Cancellation in Go
  16. 32:37Recap
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.