aws / amazon-mwaa-docker-images

Apache License 2.0
24 stars 11 forks source link

Health monitoring and auto restart mechanism #66

Closed rafidka closed 3 months ago

rafidka commented 3 months ago

Issue #, if available: #16

Description of changes:

Implements a generic and expandable health monitoring for sub-processes and use it to monitor the health of Airflow components based on health metrics and database connectivity.

To keep the implementation generic and make it expandable for future requirements, I introduced the concept of process conditions. Conditions runs regular and do certain checks to determine whether the process should continue or it should be stopped. For example, for a time-limited process, e.g. requirements installation, the TimeoutCondition can be used. Or, if a process needs to connect to the Airflow database, then the AirflowDbHealthCondition can be employed. This makes it easy in the future to add further conditions and easily plug them to any subprocess.

For now, the following process conditions are introduced:


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.