Skip to content

Instantly share code, notes, and snippets.

@mipearson
Created March 31, 2015 04:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mipearson/bdcb5ff3f8ec01bd4607 to your computer and use it in GitHub Desktop.
Save mipearson/bdcb5ff3f8ec01bd4607 to your computer and use it in GitHub Desktop.

Requirements:

  • Be restartable without denying or prematurely closing requests (unicorn's SIGUSR2 being the "gold standard")
  • Log information about requests in logstash compatiable JSON, including request path, request time & status code. Optionally should include request parameters, content length, content type & time spent in DB, views, external services
  • Report exceptions to Rollbar & not die if an exception is encountered
  • Connect to external resources via environment variables, optionally also via command line flags (cf 12factor app)
  • Allow for automatic destruction/creation of database tables in tests
  • Allow for programmatic migration of database tables in production (standard: rake db:migrate)
  • Require no filesystem resources other than its own binary (eg, no db.yml or migrations directory)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment