Search code examples
deploymentproduction-environmentrelease-managementab-testingcanary-deployment

Canary vs. A/B release strategy


I was going through the different types of release strategy and was confused between the Canary and A/B strategy. Both of them seems to be similar.

Everywhere I read on Canary is "Allows to test deployment by releasing the new version to a small group of them." and on A/B is "An A/B testing strategy targets a specific group of customers."

Then where the differences lie between them and what are the use cases of both?

References: https://azure.microsoft.com/en-in/overview/kubernetes-deployment-strategy/


Solution

  • A/B test's purpose is usually to see users' response (In a way, how much they like it) to a new UI, feature, etc. But you know that the new version works. So, you actually send randomly both versions of the application to all of them. It can be 50-50, 80-20, 90-10, anything. Sometimes the functionality is not even relevant. You might want to see which version attracts more clients and stuff like that.

    Canary is more focused on how well works the new feature. Or if it actually works. It usually will be 90-10, 80-20, A >> B. Never 50-50, because if it goes wrong, you don't want half of your users to have a bad experience. So you are not positive if the new version is going to work as expected.

    The most important difference (and this is what almost no one talks about) is that a canary testing has session affinity. So it doesn't send both versions to all users, but randomly sends some users to the new version, and keeps them on the same version.