Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENV naming for multiple servers #72

Open
jage opened this issue Nov 2, 2018 · 4 comments
Open

ENV naming for multiple servers #72

jage opened this issue Nov 2, 2018 · 4 comments

Comments

@jage
Copy link
Contributor

jage commented Nov 2, 2018

Currently we're using the following scheme for multiple servers, a new variable per server:

  • RABBITMQ_01_HOST
  • RABBITMQ_02_HOST

But for a lot of other servers we use:

  • MEMCACHIER_SERVERS
  • KESTREL_SERVERS

So the question is, what do we prefer?

I'm leaning towards using _SERVERS or _URLS with a comma-separated list, that seems to be a general consensus among other gems.

I think using fewer variables could be positive during maintenance, as in it's easier to change a variable than make sure it's removed (Consul KV, Heroku config etc).

@jage jage added the question label Nov 2, 2018
@dentarg
Copy link
Contributor

dentarg commented May 6, 2019

Sure, I agree.

I prefer _SERVERS, as RABBITMQ_URL exists, which is the full connection string.

We should probably include the port number in the list of servers, and use make use of :addresses in Bunny. (We use :hosts now.)

I think this commit was our first used of RABBITMQ_NN_HOST, 17 Jun 2015. Bunny added :addresses Jul 30, 2015. :)

@dentarg
Copy link
Contributor

dentarg commented Aug 26, 2019

We should probably include the port number in the list of servers, and use make use of :addresses in Bunny. (We use :hosts now.)

I need this for https://github.com/twingly/imse/pull/56. GitHub Actions assign ports randomly to services: https://github.com/actions/example-services/blob/dfd84e0637dda63c0359a07a7161fbfd2a6da738/.github/workflows/postgres-service.yml#L52-L54

@dentarg
Copy link
Contributor

dentarg commented Aug 26, 2019

Oh, we have this: https://github.com/twingly/twingly-amqp#customize-options. I will try it.

@dentarg
Copy link
Contributor

dentarg commented Aug 26, 2019

Seems to work

@dentarg dentarg removed the bug label Aug 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants