img
Home > Design Patterns > Container Chain

Container Chain (Erl, Naserpour)

How can containerized microservices with scheduling requirements be coordinated to ensure they are powered on and off in the correct sequence?

Container Chain

Problem

Business automation logic, state data requirements and infrastructure requirements may demand that microservices and their underlying resources be powered on and off in a specific order. Customizing this type of operational scheduling logic is complex and impractical, yet not having a pre-defined order can result in a variety of problems, including corrupted state data.

Solution

The containerized microservices are deployed in a pod through which operational scheduling logic can be defined and maintained.

Application

The operational scheduling logic is pre-defined in a chain configuration that enables containers to be powered on and off within the pod. Various chaining scenarios are supported, including the option of having microservices powered on and off independently of a chain.

A solution is provided that can schedule, start and stop the services and components in a specific order. To achieve this, the first step is to have control over the environment that the components reside in so that some of the configurations and functions can be determined and controlled. In addition, it needs to be ensured that the same order is followed every time a new instance of the microservice is instantiated or deployed.

Container Chain: A pre-scheduled start-up sequence of Microservice A and its components.

A pre-scheduled start-up sequence of Microservice A and its components.

This pattern can be applied using pods and can further support the exclusion of components from the chain, 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..