if you doing file uploads with rails youre gonna have a bad time
TRANSCRIPT
Dave Rauchwerk @[email protected]
● Moved from Austin in December
● I sometimes enjoy eating canned corn directly from the can
● According to current NASA policy I'm too tall to go space - must be under 6ft to fly
● iOS && backbonejs mobile web apps talking to "RESTFUL" Rails on heroku
THE FUTURE OF THE INTERNET
Keep it lean - MVP
● Upload very high-res pictures of cats (300 dpi)
● Rate Grumpiness
Awesome Ways to Handle File Uploads
Rails < 4● Paperclip + rmagick + S3 - https://github.
com/thoughtbot/paperclip● Carrierwave + minimagick + S3 - https:
//github.com/Filepicker/filepicker-rails● filepicker_rails + S3Rails 4 - The Future!● Streaming!
Common Probs
Heroku● files larger than 4mb
cause H11&H12 errors
Other Envs● long running requests
take up workers ● config● imagmagick memory
leaks
Solutions
● Separate Server for uploads (SOA)
● No Uploads larger 4mb
● Upload directly to S3
Ideal Architecture
Rails App Streaming Server(uploads)
Amazon S3Rackspace CloudAzure Blobstore
Client mobile || web
Long Short
Long