AAV
AAV

Reputation: 423

Blue-green deployment: how do you keep test data out of production?

I understand that blue-green deployment means having two versions of production code deployed. It allows us to test in production.

Assume that we have an e-commerce application, and both deployments are sharing a database. Then someone testing the green deployment makes a purchase. This purchase will be recorded in the production database even though it was just a test.

How do you deal with this scenario? How do blue-green deployments handle database interactions in general?

Upvotes: 0

Views: 261

Answers (1)

David M. Karr
David M. Karr

Reputation: 15205

I'm not sure what resources you're looking at, but at least in our organization, using Kubernetes, blue-green deployments are not used for "canary testing", which is what you're referring to. Blue-green deployments are used to facilitate smooth deployment switches. During the process of deployment, the existing pods in the "current color" are still running while the pods in the "target color" are starting up and reaching readiness state. The service doesn't switch over to the target color until the new pods in the target color are all ready.

Regarding how you would do that sort of thing with "canary testing", I'd say that is completely application-specific.

Upvotes: 1

Related Questions