AutoStopping strikes again! Learn to use it for Google Compute Engine with our step-by-step guide for cloud cost optimization. Try it now!
Cloud spending is on the rise, and if not managed properly, it can be a burden on a company's resources. We've seen that a significant portion of it can be saved by intelligently managing idle resources on non-production workloads. Idle resources are those resources (such as VMs) that are running but not actively receiving traffic. As a result, running them is considered cloud waste.
We have seen that companies can save 70%+ of their monthly non-production cloud compute costs if these resources are managed properly using effective cloud cost management tools. We spoke about how to go about doing this for Kubernetes in one of our previous blogs on AutoStopping Rules for Kubernetes Clusters.
Harness Intelligent Cloud AutoStopping is a smart and automated way of orchestrating the usage of non-production workloads by dynamically optimizing the usage of cloud resources by managing their idle time effectively. AutoStopping currently supports AWS, Azure, GCP, and Kubernetes clusters.
This involves 2 major steps:
This involves the following steps:
This involves the following 3 steps:
Once the Rule is saved and created successfully, you can leverage AutoStopping to manage these Compute Engine VMs. Whenever they are idle beyond the configured idle time, AutoStopping will automatically shut them down. When the VM is next accessed using the DNS link configured, AutoStopping will bring it up for the user in real time.
Implementing AutoStopping involves two actions to solve the problem of optimizing for idle resources:
This is best performed by using a custom load balancer, which would route traffic to the configured VMs. When the VMs are in a stopped state, the user would see a default progress page during which the VMs are brought back up, or as we call it, “warmed up.” All this is possible using a custom load balancer.
AutoStopping is implemented with the help of the following components :
A single custom load balancer can be configured to be used for multiple AutoStopping Rules that belong to the same VPC. VPCs span multiple regions, which lets us save on costs by utilizing a single custom load balancer for multiple Rules. A custom implementation was chosen over native load balancer since the native GCP HTTP(s) load balancer is in beta. It is also cost effective to launch a custom load balancer that is not limited by the number of Rules that can be configured in one load balancer.
This custom load balancer is composed of Envoy and other proprietary services.
Envoy is an L7 proxy designed for large modern service-oriented architectures. It is usually run as a sidecar for any application, thus abstracting the network topology, and is suitably called as Envoy mesh. It comes pre-built with support for filter chains to support complex operations. Filter chains are, to put it simply, more like a chain of middleware in any API service setup.
While this is not what is used in AutoStopping, below is an example static configuration for a service running on port 8080 but listening on port 80:
static_resources:
listeners:
- name: listener_0
address:
socket_address: { address: 127.0.0.1, port_value: 80 }
filter_chains:
- filters:
- name: envoy.filters.network.http_connection_manager
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
stat_prefix: ingress_http
codec_type: AUTO
route_config:
name: local_route
virtual_hosts:
- name: local_service
domains: ["*"]
routes:
- match: { prefix: "/" }
route: { cluster: some_service }
http_filters:
- name: envoy.filters.http.router
clusters:
- name: some_service
connect_timeout: 0.25s
type: STATIC
lb_policy: ROUND_ROBIN
load_assignment:
cluster_name: some_service
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
address: 127.0.0.1
port_value: 8080
Envoy is composed of Clusters and Listeners. Clusters are the target equivalent of an AWS ALB target group. Listeners stand for the incoming port at which requests would come and be routed to clusters based on route configurations and route path matches. Filters can be configured in the Listeners to perform certain actions.
Harness Intelligent Cloud AutoStopping uses Envoy and other proprietary services for the custom load balancer that routes traffic to configured Google Compute Engine VMs.
Taking advantage of an effective cloud cost management platform is crucial in today's rapidly evolving digital landscape. The power of Intelligent Cloud AutoStopping for Google Compute Engine not only helps in efficient resource management but also plays a significant role in cloud optimization. By leveraging the capabilities discussed in this article, you can ensure that you're not only maximizing the utility of your resources but also keeping a close eye on your google cloud billing.
Let's get started on reducing your google cloud billing, achieve your cloud budget, and ensure efficient resource utilization.