Distributed Application Architecture Patterns

6.4 Externalised Configuration

Centralised configuration management

This pattern is based on Externalized configuration by Richardson [20, p. 361, 87], Managed Configuration by Fehling et al. [15, p. 247, 88], and External Configuration Store by Microsoft [89]

The Control Bus pattern by Hohpe et al. [4, p. 477, 90] is a similar concept, using messages to control other services

6.4.1 Context

When creating many deployments in a system, it might become challenging to configure or update the configuration of each instance properly. This causes the system to become inflexible and increases the probability of user error, which can lead to failures or security issues.

6.4.2 Solution

Centrally manage the configurations of each service. The configuration is either requested by the services themselves when they start or is requested by the infrastructure when creating each service (see fig. 13).

Figure 13: Externalized Configuration

This is sometimes called pull-based externalised configuration or push-based externalised configuration [20, pp. 362–363].

6.4.3 Potential issues

The configuration might become a single point of failure. If the services request the configuration themselves, changing the configuration store implementation or location might require changes in all services.

If the number of services is very high, the services change frequently, or the configuration needs to be updated online, the configuration store could become a bottleneck.

6.4.4 Example

ExampleEshop employs partitioned data stores for its product catalogue or its search index. This requires managing many instances, and any changes in configuration, such as after upgrading the database version, would require updating each instance manually. To address this, the system uses a central configuration store. The infrastructure is configured to pull the configuration from this store on startup, allowing easy updates and ensuring that all instances are running the same configuration.

The Identity Provider uses the same concept, but is used for accommodating security rather than scalability.

6.4.6 Further reading


  1. Internet of things↩︎