Help get this topic noticed by sharing it on Twitter, Facebook, or email.

Secondary DB in EU region

I'm running an application with ClearDB on Heroku. I recently forked it to the EU region to have a backup there in case of a regional failure in US-east. Pointing the EU app at either of the two US ClearDB masters isn't working because the latency of the requests adds up quickly in my application. So I created a new ClearDB instance in the EU region for the EU app.

Is there a nice way to keep this EU database up-to-date frequently? I can do a mysqldump of the US DB and take that into the EU DB, but that probably shouldn't be done frequently. Or can it? Can I make this a scheduled job on Heroku?
1 person has
this question
+1
Reply
  • Hi Adam,

    Our clusters are already geo-distributed, between US-East-1 and US-West-1 in the US, and between EU-West-1 and Azure West Europe in the EU. You shouldn't have to do this at all really, unless your application requirements need it.

    Best,
    Cashton
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly happy, confident, thankful, excited indifferent, undecided, unconcerned

  • Hi Cashton,

    Maybe I'm missing something. If I have heroku app running in the EU, you're saying that there already is an EU replicate of my US database? I know about the two masters in the US, but the EU app is too far to reach those without latency adding up.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly happy, confident, thankful, excited indifferent, undecided, unconcerned

  • No, clusters in the EU do not communicate / replicate with clusters in the US, or vise versa due to data jurisdiction laws and regulations.

    What I'm saying is that we have the geo-redundancy already in place so that you don't have to do what you're trying to do by copying US based databases into the EU (unless you're worried that the *entire* US network will become unavailable). Even then, what you're trying to do may violate data jurisdiction laws.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly happy, confident, thankful, excited indifferent, undecided, unconcerned

  • I think I'm not explaining my problem. Here it is:

    If US-east goes down, taking Heroku and ClearDB-east down with it, I need a backup server elsewhere. That server is Heroku-EU. That server needs a database that has pretty much the same stuff in it as the original US database. In this scenario, when US-east went down, US-west is still up with my second ClearDB master. But that doesn't help me with my EU server, it can't get there fast enough. The data in the US has to be made available close to the EU server. Therefore, I want to replicate the data from the US to the EU. And I want to do it frequently so that in case Heroku-us does go down, Heroku-eu has fairly recent data in its proximal database.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly happy, confident, thankful, excited indifferent, undecided, unconcerned

  • Oh I see now.

    So the only way to really do this is via a scheduled job using mysqldump, and we recommend that you export your source backups from the backup head on the cluster for which your databases reside. If you need to know which host this is, please create a support case via the ClearDB console so that we can identify which cluster you are referring to.

    Now, just as an aside - if you are not moving data around that violates data jurisdiction laws, we also support creating transatlantic mission-critical clusters that do replicate in realtime between US-East-1 and EU-West-1. Would you like to know more about our mission-critical offerings?

    Best,
    Cashton
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly happy, confident, thankful, excited indifferent, undecided, unconcerned

  • OK.

    The backup head is the nodename listed in the backups tab of the dashboard, like "us-mm-auto-dca-01" or is that just one of the masters?

    Yes, I might be interested in a transatlantic set-up, only I'm afraid to ask how much that would cost.... None of my data would violate any jurisdiction laws. What I would need is a system with 2 masters in the US in case of a DB failure while Heroku is still up, and a third server, don't care if it's a master or a slave, in Europe, in case Heroku-US goes down.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly happy, confident, thankful, excited indifferent, undecided, unconcerned

  • By the way, what would be the maximum frequency recommended for dumping the data and inserting it into the EU db? I'm thinking of doing a mysqldump piped directly into a mysql call, at least every hour.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly happy, confident, thankful, excited indifferent, undecided, unconcerned

  • EMPLOYEE
    I’m happy
    Hi Adam,

    Please send an email pointing to this thread as well as what you're looking for to sales@cleardb.com so that we can work on a solution for you. :-)

    Best regards,
    Cashton
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly happy, confident, thankful, excited indifferent, undecided, unconcerned