dynamic configuration techniques for Microservices

4/22/2020

I'm running micro services on Kubernetes cluster, currently all my configurations are injected as environment variables at the time of deployment but few micro services require certain business configuration which can change any number of time over the lifetime of a pod, so I decided to keep them out of ENVs and here is what I could think of,

a configuration server which allows business to modify configs(via UI) and stores configs persistently(some k,v db).

now to update MSs config

  • the config server can push it.

    but this is difficult because there are n replicas of each MS and how to update them all?.

  • MSs can pull the config from the config server.

    but this requires regular polling which is expensive.

So what is the better way to manage the dynamic configuration and update all replicas of required MS only when update happens to a configuration.

-- mahendra
configuration-management
kubernetes
microservices

0 Answers