production.rb
config.action_controller.asset_host = Proc.new { |source, request, asset_path| if some_condition "http://myassets.com" else asset_path end }
See AssetTagHelper for more information.
Edit
I do not think that this precaution deserves additional loads / added requests to your application. If you were building a large application with fault tolerance servers to ensure high availability, assets would be another thing you could handle with this redundancy. If you place your stuff in the cloud using AWS or Rackspace, I think you are well versed in accessibility and you should not worry about this issue. This approach almost completely negates the benefits of asset caching.
source share