I want to manually route some traffic to a specific version of my server. I'd be happy with using a cookie or a cname but neither works. The traffic splitting documentation is clearly wrong since it disagrees with itself.
This page says it sets a GOOGAPPUID cookie automatically https://cloud.google.com/appengine/docs/standard/splitting-traffic ("If the response does not contain the GOOGAPPUID cookie, the app first adds the GOOGAPPUID cookie with a random value between 0–999 before it is sent."). The page where you actually do the splitting says it doesn't https://console.cloud.google.com/appengine/versions/trafficsplitting ("The cookie must be set by the application itself or no diversion will occur.")
Nowhere does it explain how to map the 0-999 values to specific versions. All I can do is choose a %. And what does "no diversion" mean? Which version is going to get the traffic?
I'd be happy with pointing a cname at VERSION-dot-APPNAME.ue.r.appspot.com if there was a way to get that to work but I can't get that working either.
Hi,
Looking at the documentation and Console UI, it seems to me that you can't actually map the 0-999 values to versions. It looks like you can only specify percentage of traffic that should go to each version and then Google will handle the split (by IP or cookie) to meet those percentages.
That's what it looks like but it's hard to believe such a basic feature is missing. And the inconsistency between the docs and the console is disconcerting.
Hi @bzzz,
Thanks to @NoCommandLine for pointing out that GCP handles the traffic split automatically based on the percentage, not specific cookie values.
It appears that the traffic division operates using percentages, but you must configure the GOOGAPPUID cookie on your own. GCP does not assign specific versions to the 0-999 cookie values; rather, it divides traffic according to the percentage you configure. If a cookie isn't present, traffic will revert to the default/standard version.
For the version-specific URLs, confirm that your domain mapping is configured accurately and that there are no firewall problems preventing access to the version URL. Hope that clears things up!
Was this helpful? If so, please accept this answer as “Solution”. If you need additional assistance, reply here within 2 business days and I’ll be happy to help.
To clarify the issue. I want most users to see version 1 of my app. I want specific users to see version 2. If I set up a 99.9% for version 1 and 0.1% for version 2, what value should I put in the GOOGAPPUID cookie? 0? 999? Something else? Docs say the number is "used to route the request" but that doesn't help. Likewise "according to the percentages" doesn't answer the question.
Furthermore, in one place the docs says the cookie must be set by the app. In another place, it says it's set automatically. Both cannot be true.