Chapter 9. Configuring Microservice Ecosystems

Configuration is one of the areas of architecture and implementation that are often overlooked by product teams. A lot of teams just assume that the legacy paradigms for configuring applications will work fine in the cloud. Further, it’s easy to assume that you’ll “just” inject all configuration through environment variables.

Configuration in a microservice ecosystem requires attention to a number of other factors, including:

  • Securing read and write access to configuration values
  • Ensuring that an audit trail of value changes is available
  • Resilience and reliability of the source of configuration information
  • Support for large and complex configuration information likely too burdensome to cram into a handful of environment variables
  • Determining whether your application needs to respond to live updates or real-time changes in configuration values, and if so, how to provision for that
  • Ability to support things like feature flags and complex hierarchies of settings
  • Possibly supporting the storage and retrieval of secure (encrypted) information or the encryption keys themselves

Not every team has to worry about all of these things, but this is just a hint as to the complexity of configuration management lying below the surface waiting to strike those who underestimate this problem.

This chapter will begin by talking about the mechanics of using environment variables in an application and illustrate Docker’s support for this. ...

Get Building Microservices with ASP.NET Core now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.