Tom Fishman
Tom Fishman

Reputation: 1826

What is the best practice to roll out a new version in google app engine

When we switch the server code to a new version in google app engine console, lots of new instances need to be spawned. Because of that, we see some 500 errors and long response time.

What is the best practice to mitigate those problems?

Upvotes: 1

Views: 299

Answers (3)

Nick
Nick

Reputation: 1822

500 responses have not always occurred to requests during a deployment. Previously the new version of your app was able to take over traffic from the old without interruption, however that seemed to stop quite some time ago. These 500s don't appear to go to your application at all (as in no requests will show in your logs, and they won't be served by your applications 500 page). The time window also seems to vary from between none, to up to a minute.

I'm not aware of any indication that the appengine team is looking at solving this, although it seems like a bug (or at the least a reasonable feature request).

To get around this issue, we generally deploy to a different version and switch that to be the default version. Once that is serving traffic, we deploy to the previous version, then switch it back to default. This allows customers to be served uninterrupted, but it does require (at least in java land) a new build.

Upvotes: 2

Tim Hoffman
Tim Hoffman

Reputation: 12986

In addition to the other persons answer re: warmup requests, you should also look at traffic splitting - "App Engine's Traffic Splitting tool allows you to roll out features for your app slowly over a period of time, similar to what Google does when rolling out a new feature over a few days or weeks. Traffic Splitting also allows you to do A/B Testing. Traffic Splitting works by splitting incoming requests to different versions of your app."

docs here https://developers.google.com/appengine/docs/adminconsole/trafficsplitting

Upvotes: 1

Related Questions