Upgrade to Pro — share decks privately, control downloads, hide ads and more …

How to be Happy: Even When Your Sysadmin Knows Where You Live

How to be Happy: Even When Your Sysadmin Knows Where You Live

It's hard to be happy. It's easier when you write software that doesn't give your sysadmin reason to arrive at your doorstep at 3am. Here's how.

Transcript

  1. None
  2. HOW TO BE HAPPY even when your sysadmin knows where

    you live
  3. josephholsten.com • from teh internet • info janitor @ simply

    measured
  4. who are you?

  5. have you ever? • set up a home server? •

    had the hard drive go corrupt? • had an update introduce errors? • had a dependency conflict when installing? • had it become mysteriously slow?
  6. boring is better moral:

  7. a day in the life

  8. None
  9. None
  10. fat artifacts • dependencies

  11. deployment • install & config • roll forward • signals

    & services
  12. config

  13. services • foreman • process manager upstart, systemd, smf, runit

    • process monitoring god, bluepill, monit
  14. rebuild

  15. congrats!

  16. ooo, shiny

  17. zero downtime restarts • socket handover unicorn, rainbows, passenger 3

    • proxy drain haproxy • stop requesting new jobs resque
  18. signals • Signal Queues • Read http://unicorn.bogomips.org/SIGNALS.html • Then read

    jstorimer’s “Working with UNIX Processes”
  19. #!/usr/bin/env ruby # trapper - demo ^C (SIGINT) handler !

    trap('INT') { puts 'Got SIGINT'; exit } ! while true; end # loop
  20. data migration

  21. feature flippers

  22. [christmas lights]

  23. oh, no.

  24. what’s the problem? • crashing • incorrect results • races

    or deadlocks • performance
  25. do i care? • omg: monitoring • oops: issue tracking

    • fyi: logging, metrics
  26. None
  27. req/sec sec/req

  28. None
  29. STDOUT.printf

  30. None
  31. exceptions

  32. None
  33. None
  34. if you liked it you should have put a nagios

    check on it