Good practices for Rails website with lots of photos -
i have website tons of photos, , displays them right when visit it. best practices displaying these photos within rails app.
i have done typical uploading aws, , resizing using paperclip. looking other gems out there or servers website load faster, etc.
split asset loading amongst multiple hostnames. create assets0, assets1, assets2, , assets3 cnames point website. add config/environments/production.rb
:
config.action_controller.asset_host = 'https://assets%d.yourdomain.com' config.action_mailer.asset_host = 'https://assets%d.yourdomain.com'
assets loaded 1 of 4 cname's. trick browsers running more requests simultaneously browsers limit number of simultaneous requests single server.
see here more:
http://api.rubyonrails.org/classes/actionview/helpers/asseturlhelper.html http://www.die.net/musings/page_load_time/
Comments
Post a Comment