1

I have a Rails 3.2 application hosted by Heroku. I am based in the UK and most of the application's users are based in Europe. Currently the performance leaves a lot to be desired, given that the app is located in the American region.

Is there anything I can do to improve performance for European users whilst still hosting with Heroku, or do I need to look for an alternative host based in the European region?

Edit: The problem is not the app. It's the delay between requesting a page and the request hitting the app.

4
  • 1
    Did you profile your application? Are you sure that the performance issues stem from network delays and are not caused by other factors?
    – Mchl
    Mar 1, 2013 at 12:14
  • 1
    You might want to look for alternatives to heroku if you need hosting in Europe. As @Mchl wrote, check what is actually the performance bottleneck. If it is the server placement, you might want to look into appfog as an alternative.
    – Automatico
    Mar 1, 2013 at 12:21
  • @Mchl Yep definitely lag before it even hits Heroku. Mar 1, 2013 at 12:28
  • 1
    With web apps, it can sometimes be the web html response that takes a long time, and sometimes the assets. How long is the lag for the HTML and how long for the assets? You may be able to make the assets load fast if the HTML load is acceptable. Mar 1, 2013 at 16:26

3 Answers 3

3

As of yesterday (2013-04-24) The simple answer to this question is heroku create --region eu

Read more on the blog: https://blog.heroku.com/archives/2013/4/24/europe-region

To migrate an existing app: https://devcenter.heroku.com/articles/app-migration#fork-application

0

If you're on the free stack then use this tip to prevent your dyno from idling and spinning down (and having to spin back up):

Easy way to prevent Heroku idling?

Find out which pages are having the most negative impact on performance and see if you can use any of these caching strategies to lighten the load:

https://devcenter.heroku.com/articles/caching-strategies

Identify processes that could be run in the background so you can return requests faster. Resque and Redis for that:

https://devcenter.heroku.com/articles/queuing-ruby-resque

2
  • As I mention in my question, the problem is not the app, but the distance. Whilst all these suggestions are valid, they are generic and not related to my particular situation. I have 2 Web dynos, already use Sidekiq and use caching wherever appropriate. Mar 1, 2013 at 12:51
  • I can't think of anything that would solve the "distance" problem except performance tuning your app or moving to a host in Europe. Mar 1, 2013 at 13:10
0

Have you looked at:

  • reduce page size / number of objects - doesn't matter how fast you make the site, if the pages are huge
  • add a CDN - moving static content closer to the user dramatically improves the performance for those assets (how much it impacts your site, depends on how much static data you have)
  • various other performance tweaks from yslow or similar
  • anycast DNS - a decent DNS service can make a minor but noticeable difference

I spent some time optimising my site on Octopress/Heroku, and wrote it up (http://www.damon.io/blog/2013/01/10/improving-octopress-jekyll-site-performance-DNS-hosting-CDN/) there's some comparisons for some CDNs and DNS which you may find interesting.

Of course, how relevant this is to your site, I can't say, but hopefully there's something useful in here for you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.