Sobes.tech
Middle

You mentioned a canary approach through Istio — tell us more.

sobes.tech AI

Answer from AI

Canary deployment through Istio is a method of gradually releasing a new version of a service, where traffic is initially directed to a small percentage of new pods, and then gradually increased.

In Istio, this is implemented using VirtualService, where traffic routing rules can be set by weights. For example, 5% of requests go to the new version, and 95% to the stable version.

Advantages:

  • Risk minimization: if the new version contains bugs, they affect a small percentage of users.
  • Monitoring capabilities and quick rollback.

Example of VirtualService configuration for canary:

apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: myservice
spec:
  hosts:
  - myservice.example.com
  http:
  - route:
    - destination:
        host: myservice
        subset: stable
      weight: 95
    - destination:
        host: myservice
        subset: canary
      weight: 5

Here, subset refers to service versions defined in DestinationRule. This approach allows for smooth and safe deployment of updates.