How to have the same value as a config for multiple apps

Setup: I have the application X in which I implant for production 2 pods (kubernets) of this app.

There is a config that I will need to change at some point, but when I change I need to change it in all replicas (2 pods).

Possibility I thought:

  • Read the configuration from the database and the apps stay from time to time checking to see if it was changed in the database to update.

What would be good partners and tools to solve this?

1 Like

Have you looked at etcd?

1 Like

About any KV-store that supports notifying the client should suffice. Redis can do this, Consul can do as well, and I’m pretty sure the already mentioned etcd can do this also.

I’m not sure though how they are supported through client libraries in elixir.

1 Like

I did not know etcd, looking now

What do you think about using Postgres using LISTEN and NOTIFY?

This can probably help you:

But have in mind that it’s not so clear and cut and simple. There are caveats. IMO you’d be better off pursuing simpler solutions.

1 Like