concept traffic in category istio

appears as: traffic, traffic
Istio in Action

This is an excerpt from Manning's book Istio in Action.

Although deployment is a key consideration to a CI/CD platform, as we’ll see, traffic control and routing are also important. What happens when we bring a new deployment to an environment, especially production? We cannot just take down the old version and bring up the new version that would mean an outage. We also cannot replace them in place (unless we’re magicians). What we want is a way to control the rollout of a new release by selectively bringing traffic to the deployment. To do this, we need the ability to control the traffic, which is what Istio gives us. With Istio we can finely control traffic to new deployments and reduce the risk of doing deployments. As we aspire to do deployments quickly we should also lower the risks of doing those deployments. Istio helps with that.

In the previous chapter, we saw how to get traffic into a cluster and what considerations we needed to account for when doing so. Once a request makes it into our cluster, how does it get routed to the appropriate service to handle the request? How do services that live within the cluster communicate with other services that live within the same cluster or sometimes that live outside the cluster? Lastly, and most importantly, when we make changes to a service and introduce new versions, how do we safely expose our clients and customers to these changes with minimal disruption and impact?

As we’ve seen Istio service proxies broker the communication between services within the service mesh cluster and gives us a point of control for traffic. Istio allows us to finely control traffic flowing between applications down to the individual request. In this chapter, we’ll take a look at why you might want to do that, how to do it, and what benefits you should achieve when utilizing these capabilities.

Figure 5.1. In a blue-green deployment, blue is the currently released software and when we release the new software we cutover traffic to green version
blue green

When they wanted to release to their customers, they would cut over the traffic to v2 (green). This approach helped them reduce outages when doing deployments because if there were any issues, they could always just cut back to v1 (blue) of their service. Blue-green deployments help, but when we do the cut-over from v1 to v2, we still experience a "big bang" release in which we release all the code changes at once. Let’s see how we can further reduce the risk of doing deployments. First, we should clarify what we mean by "deployment" and "release".

$  curl  http://localhost/api/catalog -H "Host: apiserver.istioinaction.io" \
-H "x-istio-cohort: internal"