Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the best way to run a cross-region deployment on Heroku?

I'd like two use at least two Heroku regions - US and EU. The goal is to give each user the server closest to them.

I know how to achieve this with AWS - Latency Based Routing.

Is LBR limited to 'pure AWS', or can it easily be applied to Heroku or hosting?

In any case, LBR only solves a part of the problem (end user --> web dyno). Is there a guide to working with Heroku databases / other resources cross regions?

like image 819
ripper234 Avatar asked Jul 01 '13 12:07

ripper234


People also ask

Can I change region of Heroku app?

Begin the verification phase by forking the application to create a copy in another region, for example the eu region. This will copy all Heroku Postgres data and config vars and will re-provision all add-ons. Depending on the size of your database this process may take some time.

How do I run a deployed app on Heroku?

To deploy your app to Heroku, use the git push command to push the code from your local repository's main branch to your heroku remote. For example: $ git push heroku main Initializing repository, done.

When should I use Heroku connect?

If you're building a Heroku app or already have data in Heroku Postgres, then Heroku Connect is a good fit for your Heroku to Salesforce integration. For example, one or more Salesforce orgs can sync to the same Heroku Postgres database.

Does Heroku have continuous deployment?

Heroku provides a variety of continuous delivery tools to help you deploy effortlessly and safely: Pipelines make it easy to maintain separate staging and production environments for your app. Review apps let you try out a GitHub pull request's changes in an isolated and disposable environment.


1 Answers

Yes, this is completely possible, you would need to choose the AWS region for each record that matches the Heroku region in question. e.g

foobar.example.org CNAME myuseast.herokuapp.com -> latency based us-east-1
foobar.example.org CNAME myeuwest.herokuapp.com -> latency based eu-west-1

This link explains how to find the regions, eu = eu-west-1, us = us-east-1 Where are Heroku apps hosted exactly?

It is important to consider that users who have similar pings to both US and EU data centres may get routed to one one day and the other the next.

This link explains that this is possible, I have also tried it in my own AWS account just now. https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/resource-record-sets-values-latency.html

like image 126
OllyTheNinja Avatar answered Oct 12 '22 17:10

OllyTheNinja