img
Home > Design Patterns > Volatile Configuration

Volatile Configuration (Erl, Naserpour)

How can a container adapt to the unpredictable usage requirements of the microservice it is hosting?

Volatile Configuration

Problem

When a microservice scales in, out, up or down in response to runtime usage fluctuations, its underlying container may not be able to keep up and may therefore be subject to runtime exception conditions.

Solution

System mechanisms are utilized to keep the container’s configuration in sync with the potentially volatile runtime conditions of its hosted microservice.

Application

A monitoring mechanism is used to keep track of runtime conditions and a configuration writer mechanism is used to continually update the container’s configuration in response to reported runtime conditions. The application of the Microservice Instance Registration pattern also needs to be applied in support of this pattern.

A system is implemented within the container that is capable of detecting and dynamically responding to scalability-related changes in hosted microservices and components. Special listener and container configuration writer mechanisms work within the container at runtime to detect scalability changes and then immediately update the container’s configuration file.

Volatile Configuration: The container configuration writer is notified of the need to scale out the container to facilitate the creation of two additional instances of Microservice A.

The container configuration writer is notified of the need to scale out the container to facilitate the creation of two additional instances of Microservice A.

This pattern can be applied in conjunction with the Service Instance Registration pattern as explained in the complete pattern description.

Module 10: Advanced Microservice Architecture & Containerization.

This pattern is covered in Module 10: Advanced Microservice Architecture & Containerization..

For more information regarding microservice and containerization courses and accreditation,
visit the Microservice Architect Certification program page..