Home >Backend Development >Golang >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
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% |
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!