Skip to content

[Proposal] Supporting active-standby applications in Kubernetes #45300

Closed
@XiaoningDing

Description

@XiaoningDing

Is this a BUG REPORT or FEATURE REQUEST? (choose one):

This is a feature request.

What you expected to happen:

Propose to have a built-in support for active-standby applications in Kubernetes.

Active-Standby applications are applications that have multiple running instances, but only one instance is active and serving workloads at one time. All other instances are idle (standby). If the active instance is down, one of the standby instances will be promoted to active immediately.

Lots of enterprise legacy applications are such applications. In fact, Kubernetes scheduler and controller manager are also examples. They run in active-standby mode in a HA deployment of Kubernetes.

These applications have similar requirements in their development and deployment, like:

  • Role assignment: one of the instances should be active and all others be standby. Each instance needs to be aware of its current role.
  • Health monitoring and role switching: when the active instance is down, one of the standby instances needs to be promoted to active. When a standby instance is down, a new standby instance should be added.
  • Traffic routing: a single service is exposed, but traffic should always be routed to the current active instance.
  • Controlled update: when update such a collection of pod instances, the standby instances should be updated before the active instance is updated.

These requirements cannot be handled by current StatefulSet object. Statefulset object is a good abstraction for clustered stateful applications, however it seems there are many differences between clustered model and active-standby model. In the former model instances are aware of each other and have their own storage, but in the latter model instances are not aware of each other and states need to be synced.

Now developers and operators need to implement above mentioned requirements again and again for all such active-standby applications. I'm wondering if we can make active-standby model a native supported model in Kubernetes so applications can focus on their own business logic.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/HAkind/featureCategorizes issue or PR as related to a new feature.sig/appsCategorizes an issue or PR as relevant to SIG Apps.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions