karailiev
karailiev

Reputation: 124

Multiple Heroku apps sharing database and queue

I have few Heroku apps (all based in the EU data centre) that are using the same database and queue. I'm sharing them by adding the add-on to one of the apps, and then setting the same environment variable to the rest of the apps and all works fine.

Does it matter to which application I'm adding the add-ons? Does this affect performance of anything else?

Upvotes: 0

Views: 52

Answers (1)

catsby
catsby

Reputation: 11342

Does it matter to which application I'm adding the add-ons?

It should not, assuming the applications are all in the same region.

Does this affect performance of anything else?

It should not, assuming the applications are all in the same region.

Those said, this is a fragile thing to do. For example Heroku Postgres (and probably other 3rd party add-on providers) may change your DATABASE_URL in order to maintain high availability in the event of some unforeseen thing (sudden hardware failure, etc).

In that situation, the application that has the add-on attached will be restarted and receive the current DATABASE_URL; your other applications will not, and likely crash all over the place.

Upvotes: 1

Related Questions