keygen-sh / keygen-api

Keygen is a fair source software licensing and distribution API built with Ruby on Rails. For developers, by developers.
https://keygen.sh
Other
826 stars 55 forks source link

Add support for EU region (+ follower database) #236

Open ezekg opened 6 years ago

ezekg commented 6 years ago

Use Cloudflare's geo-based load balancing to route between our US and EU apps (it can route to a hostname, i.e. a different Heroku app). Also will need to use octopus to add support for a follower database in the EU region (writes will still be done in the US - hopefully that's performant).

See:

ezekg commented 6 years ago

Related to #156.

ezekg commented 6 years ago

Relevant: https://github.com/thiagopradi/octopus/issues/317 (might be an outdated Octopus issue).

ezekg commented 6 years ago

Apparently you can fork Heroku apps still, just with a CLI add-on. Forking creates new databases (one for each "color" ENV var), but keeps the master set to the original database, which is what we want.

heroku fork --from keygen-sh --to keygen-sh-eu --region eu

See: https://devcenter.heroku.com/articles/app-migration#forking

We should do that for both APIs.

ezekg commented 6 years ago

See: https://devcenter.heroku.com/articles/managing-add-ons#using-the-command-line-interface-attaching-an-add-on-to-another-app