:_mod-docs-content-type: ASSEMBLY
[id="route-based-deployment-strategies"]
= Using route-based deployment strategies
include::_attributes/common-attributes.adoc[]
:context: route-based-deployment-strategies

toc::[]

Deployment strategies provide a way for the application to evolve. Some strategies use `Deployment` objects to make changes that are seen by users of all routes that resolve to the application. Other advanced strategies, such as the ones described in this section, use router features in conjunction with `Deployment` objects to impact specific routes.

////
This link keeps breaking Travis for some reason.

[NOTE]
====
See
xref:../../applications/deployments/deployment-strategies.adoc#deployment-strategies[Using deployment strategies]
for more on the basic strategy types.
====
////

The most common route-based strategy is to use a _blue-green deployment_. The new version (the green version) is brought up for testing and evaluation, while the users still use the stable version (the blue version). When ready, the users are switched to the green version. If a problem arises, you can switch back to the blue version.

Alternatively, you can use an _A/B versions_ strategy in which both versions are active at the same time. With this strategy, some users can use _version A_, and other users can use _version B_. You can use this strategy to experiment with user interface changes or other features in order to get user feedback. You can also use it to verify proper operation in a production context where problems impact a limited number of users.

A canary deployment tests the new version but when a problem is detected it quickly falls back to the previous version. This can be done with both of the above strategies.

The route-based deployment strategies do not scale the number of pods in the services. To maintain desired performance characteristics the deployment configurations might have to be scaled.

include::modules/deployments-proxy-shards.adoc[leveloffset=+1]
include::modules/deployments-n1-compatibility.adoc[leveloffset=+1]
include::modules/deployments-graceful-termination.adoc[leveloffset=+1]
include::modules/deployments-blue-green.adoc[leveloffset=+1]
include::modules/deployments-ab-testing.adoc[leveloffset=+1]
include::modules/deployments-ab-testing-lb.adoc[leveloffset=+2]
