Just for fun, I am developing several web applications using the microservice architecture. I am trying to determine the best way to manage the configuration, and I am concerned that my setup approach may have some huge traps and / or something better.
To state the problem, let's say I have an authentication service written in C ++, an authentication service written in rust, analytics services written in haskell, some middletier written in scala, and an interface written in javascript. There will also be a corresponding DB identifier, auth DB, analytic DB (possibly redis cache for sessions), etc. I am deploying all of these applications using dockers.
When one of these applications is deployed, it must necessarily detect all other applications. Since I use docker road, discovery is not a problem, since all nodes share the required overlay network.
However, for each application, host_addr hosting services are still needed, possibly a port, credentials for some databases or private services, etc.
I know that docker has secrets , which allows applications to read the configuration from the container, but then I would need to write some kind of configuration parser in each language for each service. It seems messy.
What I would like to do is to have a configuration service that supports the knowledge of configuring all other services. Thus, each application will begin with some RPC call, designed to obtain configuration for the application at run time. Something like
int main() { AppConfig cfg = configClient.getConfiguration("APP_NAME"); // do application things... and pass around cfg return 0; }
AppConfig will be defined in the IDL, so the class will be instantly accessible by the language agnostic.
This seems like a good solution, but maybe I really don't get the point here. Even on a scale of tens of thousands of nodes, they can be easily serviced by several configuration services, so I see no problems with scaling. Again, this is just a hobby project, but I like to think about what-if scenarios :)
How are configuration schemes handled in microservice architecture? Does this sound like a reasonable approach? What do major players like Facebook, Google, LinkedIn, AWS, etc. do? Do?