Traffic Splitting
Start course

This lesson is designed to teach you how to deploy an application to Google App Engine. You will learn how to deploy a new app, how to create multiple versions of an app, and how to split your user traffic between multiple app versions.

Learning Objectives

  • Deploy an application to App Engine
  • Create multiple versions of an application
  • Split App Engine traffic between multiple versions

Intended Audience

  • Cloud Architects
  • System Administrators
  • GCP Developers
  • Anyone preparing for a Google Cloud certification


  • Access to a GCP account

In previous lessons, you learned how to deploy an app to the GCP app service and how to deploy multiple versions of the app. When you deploy multiple app versions, you can split traffic across them. What you can do is specify a percentage of traffic that should go to one version and another percentage that should go to another version or even several other versions within a service. 

Traffic splitting is a great way to conduct A/B testing between different versions and it provides more control over the process of rolling out features. 

You can split traffic by IP address or via cookie splitting. You can also configure random splitting. 

If you decide to split traffic by IP address, the application, when it receives a request, hashes the IP address to a value between zero and 999. It then uses that number to route the request to a version of your app. 

When cookie splitting, the application will look in the HTTP request header for a cookie named GOOGAPPUID. This cookie contains a value between zero and 999. If the cookie exists, the value is used to route the request. In the event there is no cookie, the request is routed randomly.

Randomly splitting traffic results in a split that's based on a weighted random assignment. Incoming requests are randomly routed to a version of the app in the traffic split. 

In the next demonstration, I'm going to show you how to split traffic across two versions of an app hosted by app service.

About the Author
Learning Paths

Tom is a 25+ year veteran of the IT industry, having worked in environments as large as 40k seats and as small as 50 seats. Throughout the course of a long an interesting career, he has built an in-depth skillset that spans numerous IT disciplines. Tom has designed and architected small, large, and global IT solutions.

In addition to the Cloud Platform and Infrastructure MCSE certification, Tom also carries several other Microsoft certifications. His ability to see things from a strategic perspective allows Tom to architect solutions that closely align with business needs.

In his spare time, Tom enjoys camping, fishing, and playing poker.