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

Popular posts from this blog

c++ - OpenMP unpredictable overhead -

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

javascript - Wordpress slider, not displayed 100% width -