Wednesday, 4. September 2019 15:20 - 15:50 (30 min)
Sling Health Checks have been a long-standing, valuable tool for detecting Sling instance state for human and machine clients - however some dependencies made it difficult to use it during startup/shutdown of the OSGi container. Those use cases have become more important when using Docker containers for deployment or auto-scaling frameworks like Kubernetes. To address this need, Health Checks have been moved to Felix with minimised dependencies and the system ready checks have been incorporated. On Sling side, the existing startup mechanism has been replaced with a simple configuration of the new general-purpose ServiceUnavailableFilter that is now provided by Felix Health Checks.
This talk will show how to migrate existing checks to the new Felix API. For most custom checks the migration is straight-forward, however there are subtle changes like the newly introduced status TEMPORARILY_UNAVAILABLE. Furthermore the general checks module will be discussed (flexible checks that can be activated by configuration only) as well as how to configure probes for Kubernetes or load balancers and setup options for ServiceUnavailableFilter.
Apache Felix Health Checks:
Released Migration Kit Packages @ Maven Central:
Migration Kit Source: https://github.com/Netcentric/healthcheck-migration-kit
Apache Sling Health Checks Migration Guide (for custom checks):