Skip to Content
Google Cloud Platform for Architects
book

Google Cloud Platform for Architects

by Vitthal Srinivasan, Loonycorn Ravi, Judy Raj
June 2018
Intermediate to advanced
372 pages
8h 44m
English
Packt Publishing
Content preview from Google Cloud Platform for Architects

Traffic splitting

Traffic splitting is useful when one or more URLs are referring to multiple versions of an application or a service. Traffic splitting can be used to accomplish pretty cool functionality such as A/B testing and green/blue deployments (more on these later).

It can be achieved through either the browser or the gcloud command line.

For example:

gcloud app services set-traffic [MY_SERVICE] --splits [MY_VERSION1]=[VERSION1_WEIGHT],[MY_VERSION2]=[VERSION2_WEIGHT] --split-by [IP_OR_COOKIE]

In the preceding command, the service name is the service you use. Version names can be of your choice, but the weight must be distributed in a way that the total of the weight becomes 1. For example, if you want to distribute traffic of my service ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Google Cloud Platform Professional Cloud Architect

Google Cloud Platform Professional Cloud Architect

Victor Dantas
Google Cloud Platform for Developers

Google Cloud Platform for Developers

Ted Hunter, Steven Porter

Publisher Resources

ISBN: 9781788834308Other