Uptime - Building Resilient Services with Go

Uptime - Building Resilient Services with Go

Gopher Academy via YouTube Direct link

Intro

1 of 25

1 of 25

Intro

Class Central Classrooms beta

YouTube playlists curated by Class Central.

Classroom Contents

Uptime - Building Resilient Services with Go

Automatically move to the next video in the Classroom when playback concludes

  1. 1 Intro
  2. 2 2014 Google I/O: What's Go?
  3. 3 Kiln's SSH Reverse Proxy
  4. 4 Why Rewrite?
  5. 5 Tons of Concurrency 1. Accepts SSH connection (1 goroutine) 2. Authenticates via public/private key 3. Connects to backend server 4. Proxies STDIN, STDOUT, and STDERR (3 goroutines)
  6. 6 Resiliency: The Process
  7. 7 Careful Coding: Error Handling & Clean-up
  8. 8 Not Necessarily.
  9. 9 Careful Coding: Channels
  10. 10 Careful Coding: Panics!
  11. 11 Careful Coding: Avoid Race Conditions!
  12. 12 goroutines Should be used in unit tests, development, and testing environments
  13. 13 Careful Coding: Implement Timeouts
  14. 14 Network Timeouts: • network dial timeout • network connection inactivity timeout • total connection timeout
  15. 15 Know Your Service: How Does It Use Memory?
  16. 16 How much memory per connection? • Does the system reclaim memory that's no longer used? • What's the garbage collector doing? CODEBUG=gctrace=1 • Where is memory allocated? (PPROF)
  17. 17 Know Your Service: PPROF
  18. 18 Don't leak goroutines!
  19. 19 PPROF: From the Command Line
  20. 20 Know Your Service: Watch It Run
  21. 21 Keep Good Logs! • Create a semi-unique string per request • Use this request string as a prefix in all log entries • Always log at least the start and end of a request
  22. 22 Drain and Die
  23. 23 Game Day.
  24. 24 Wolfram Alpha Tells Me: 4MB X 10 = 40MB
  25. 25 Prod Profiling Told Me: This memory will be reclaimed

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.