DEV Community

David
David

Posted on

Old Time Tunes Dev Log 5: Adjusting Firebase App Hosting for Cost

This is a long-running series of logs that I'm sharing with my spouse to incrementally share everything I do to contribute to our project Old Time Tunes. My goal is to make tiny records of what it takes to build a web platform.

I woke up today and saw we had an alert that we'd spent half our "budget" for the month for Old Time Tunes ($12/25)! This was surprising since no one's using it and it's a tiny app.

I went to the billing center (found the link here which takes you to the center here, and then I found a cost breakdown which showed that "Cloud Run" was accounting for basically all the cost. I know that "Cloud Run" is associated with running the Firebase App Hosting that is the NextJS server.

I figured that the app currently had a configuration that was too fancy for its current state. I bumped down the number of instances of the server to 1, and bumped down its available CPU and memory resources in this commit by updating the apphosting.yaml configuration file.

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

Top comments (1)

Collapse
 
geegee profile image
Yunus

Hi, thank you for your article.
Do you mean runConfig: minInstances: 0?

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay