DEV Community

Engineering Expert
Engineering Expert

Posted on

Google cloud run : Things you should know before deploying your frontends

Our article about deploying Next.js on Cloud Run is one of the most popular articles on our blog. Many readers have reached out to express how helpful they found it. However, some people also encountered various issues that I believe are worth addressing in a separate blog post.

When you create a VM, or Virtual Machine, you have a server allocated to you 24x7. It has a processor that sits idle, waiting for work, and memory that is ready to be used. Regardless of whether you utilize it or not, you pay for the entire thing 24x7. The costs of these machines can range from $5 to $5000 a month or even more.

However, it's not just the cost of the machine. You need to spend time setting it up, ensuring it's working, and occasionally adjusting resources yourself. What if you get more traffic and want to add more machines? You can do that too. But when traffic decreases, you have to reduce the number of machines. This process can be automated, and tools like Kubernetes exist for this purpose.

The real issue arises when you have a small site with around 100 users a day, and you don't want to waste your time on a fragile $5-a-month server that keeps going down or a $45 robust server that is expensive. Nor do you want to spend $500 a month on running a full-fledged cluster of machines.

What you want is something much cheaper and extremely simple, even if it's not as fast as you'd like it to be.

Source: https://www.frontendeng.dev/blog/34-know-this-before-you-use-cloud-run

Top comments (0)