Google Updates Compute Engine Load Balancing, Adds Backup Pool
|Stuart Parkerson in Programming Monday, October 14, 2013|
With the need for modern web apps to keep session information, special support is required from the load balancing so that developers keep getting connected to a server that has the necessary context information to help them. With the latest update to Google Compute Engine Load Balancing, developers now can spread the load while tracking sessions using the client IP address. When enabled, this feature ensures that all requests from the same IP (in a session) get forwarded to the same healthy Compute Engine instance.
Google has also introduced backup pool, which can add more redundancy to a load balanced website or application. When the health of the servers in the primary pool drops to some configurable threshold, the servers in the backup pool will take over until the primary pool is healthy again. This feature can also provide more flexibility and convenience especially during patching and upgrading of backend instances.
Developers can only provide one backup pool per primary target pool and the backup pool must be in the same region as the primary target pool. If the ratio of healthy instances in the primary target pool falls below the configured failover ratio, Google Compute Engine uses the following rules to route traffic:
1 - If a primary target pool is declared unhealthy (falls below the failover ratio), traffic will be sent to healthy instances in the backup pool; 2 - If the primary target pool is declared unhealthy, but there are no remaining healthy instances in the backup pool, traffic is sent to the remaining healthy instances in the primary pool; 3- If the primary pool is unhealthy and there are no remaining healthy instances in either pools, traffic will be sent to all instances in the primary pool so as to not drop traffic; 4 - If the primary pool doesn't contain any instances, and none of the instances in the backup pool are healthy, traffic will be sent to all instances in the backup pool so as to not drop any traffic.
At most, only one level of failover is supported. For example, if target pool A has backup pool B and back pool B has a backup pool C, then traffic intended for target pool A can only reach up to backup pool B and not C.
Both load balancing and the backup pool are supported via the gcutil command line tool, RESTful API and the Cloud Console.
To learn more, Google has published here an in-depth look at load balancing on Compute Engine that shows how easy it can be to set up for even complex apps. In addition to discussing use case scenarios, this article presents the results of running load tests with a half million requests to illustrate how our load balancing works.
Read more: http://googlecloudplatform.blogspot.ca/