Home > Backend Development > Golang > Fighting GCP & Firebase Cloud Client CLI and SDK Bloat

Fighting GCP & Firebase Cloud Client CLI and SDK Bloat

Susan Sarandon
Release: 2024-12-03 09:06:14
Original
1028 people have browsed it

Fighting GCP & Firebase Cloud Client CLI and SDK Bloat

Client CLIs & SDKs for GCP, Firebase and other clouds are terribly bloated. GCP includes a python distro, firebase includes node npm. This goes unnoticed on overpowered devboxes, but impacts your cloud bill with storage, vcpu, wall-time and transfer fees. If you are trying to downsize your VMs, you will find that the client SDK/ CLI pre-requisites will often hang your machine terminal by exausting vcpu and iops budgets. Cloud container services are often storage-limited to ram-disks--so CLI installs consume what little you have.

To combat the bloat, I've started a few projects to offer lightweight solutions

  • gcloud-lite -- a stripped distro of gcloud cli that is 90% smaller
  • gcloud-go -- a 90% smaller and faster go binary for deploying to firebase and gcloud

Benchmarks

For example, e2-medium VMs using gcloud-lite are 86% faster to install the cli. This means your work can start nearly 90s faster than using the default CLI. You can downsize to x-small VMs which can save up to 75%

Image Install Time Improvement
google-cloud-cli 1m29s -
gcloud-lite 12.6s 86%

For firebase deployments, the image is 92% smaller, and startup is faster, meaning you can downsize VMs and container jobs will execute > 50% faster

docker image size savings
firebase-tools 245mb n/a
gcloud-go 19mb 92%

Reduced Storage

  • Runnable docker image — 93% smaller
  • tgz tarball — 75% smaller

How You Can Help

Please start testing the projects, and file a feature request. Patches are welcome , and please share how the lightweight CLI tools are helping your project

The above is the detailed content of Fighting GCP & Firebase Cloud Client CLI and SDK Bloat. For more information, please follow other related articles on the PHP Chinese website!

source:dev.to
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template