đĄ How to reduced backend costs by 98% using Express and Google Cloud Functions
Recently, I set out to reduce the cost of running a lightweight backend app originally deployed on a Google Compute Engine (E2.small), which was costing around $13/month.
The backend was built with Nest.js, but since the workload was minimal, I explored migrating it to Express.js on Google Cloud Functions.
After switching, the estimated costâaccording to the [Google Cloud Pricing Calculator]âdropped by *** 98% ***(we hit the endpoint once per minute and each request takes less than 1 second).
I couldnât find useful resources or sample code showing how to integrate Express with Cloud Functions. So, Iâve decided to share the architecture and setup I used to help others looking to do the same.
If youâre running a simple backend and want to optimize costs, this approach might be worth considering--plus, a major bonus is you no longer have to worry about backend crashes.. đȘ