Skip to content

Version coexistence strategy

A version coexistence strategy involves running multiple versions of a software application simultaneously within the same environment for a period of time.^[400-devops-06-kubernetes-k8s-ithelp-day14-readme.md] This approach is a fundamental component of certain advanced deployment methodologies, such as Blue/Green Deployment.^[400-devops-06-kubernetes-k8s-ithelp-day14-readme.md]

Characteristics

The primary feature of this strategy is the state where both the new version (e.g., v2) and the old version (e.g., v1) exist concurrently on the infrastructure.^[400-devops-06-kubernetes-k8s-ithelp-day14-readme.md] While both versions are running, the system temporarily experiences doubled resource consumption as it maintains the workload for both iterations.^[400-devops-06-kubernetes-k8s-ithelp-day14-readme.md]

Workflow

In a container orchestration environment like Kubernetes, this strategy is typically implemented by managing the resources that direct external traffic.^[400-devops-06-kubernetes-k8s-ithelp-day14-readme.md] The general lifecycle follows these steps:

  1. Coexistence: The new version is fully started and made ready, joining the already active old version.^[400-devops-06-kubernetes-k8s-ithelp-day14-readme.md]
  2. Transition: Traffic control mechanisms, such as a Service object, are updated to switch their destination from the old version to the new version.^[400-devops-06-kubernetes-k8s-ithelp-day14-readme.md]
  3. Cleanup: Once traffic has successfully moved to the new version, the resources supporting the old version are terminated.^[400-devops-06-kubernetes-k8s-ithelp-day14-readme.md]

Trade-offs

Although this strategy ensures [[Zero Downtime]] during updates and prevents issues arising from multiple versions handling requests simultaneously, it requires that the infrastructure has sufficient resources to handle the spike in load.^[400-devops-06-kubernetes-k8s-ithelp-day14-readme.md]

Sources

^[400-devops-06-kubernetes-k8s-ithelp-day14-readme.md]