Why should you run your code on the cloud?
There are a few reasons why I would recommend developers run their code on the cloud.
First of all, let me say once again: if you are spending too much time setting up servers, installing operating systems, deploying patches, and performing migrations, then you simply deserve better. I’ve been there and I can’t put into words how happy I felt after I left it behind. I used to dedicate 20% of my time (and much longer on specific occasions) to maintaining, troubleshooting, and supporting the operating system, applications, and database. Since I joined Google, I can use that extra time to learn, brainstorm innovative solutions with my team, or write better code. I also think that code is poetry (https://www.smashingmagazine.com/2010/05/the-poetics-of-coding/), so IMHO, inspiration arrives better when we have more time and less pressure.
Besides, most cloud-based services offer customizable infrastructure components, or at least different sizes, so you can still have a reasonable degree of control over where your code runs. In summary, running code on the cloud will provide you with more options and better performance and will allow you to focus your time on coding, not on other distracting tasks.
Also, a cloud provider has many data centers in different locations across the world. If the start-up or organization you work for is planning to grow and have customers in more than one market at some point, a single server or even a few servers in a single location may not be enough to offer decent-quality service. This is becoming more and more important as real-time services become predominant and latency has to remain low.
If you can anticipate that you may suffer a potential scaling or latency problem in the future, already being in the cloud can make things much easier if you need to replicate your architecture in another continent for local users. Having infrastructure located closer to users can also help you meet legal requirements, as some countries require data or processes to be located in-country.
And speaking about scaling, the pay-per-use model is reasonably compatible with organizations growing because you will use more resources as you make more business and generate more revenue. Besides, most cloud providers will offer bigger discounts as you increase your usage. And if you have very particular needs, you can use huge clusters for a few minutes or hours and pay a very reasonable price. Indeed, you can have thousands of servers at your command at a very affordable price, something that would be prohibitive in an on-premises data center.
If your infrastructure is affected by traffic peaks, the cloud is also your place to go. If you have a lot of visitors on Sundays, your website crashes during Black Friday, or your app is usually down during the Christmas holiday season because of seasonality peaks, you may have decided not to increase the resources available for your application or website because, during most of the year, it can handle the average demand. With a cloud provider, you can scale up your application automatically when there is a peak and you can do the contrary too – that is, you can scale it down while your customers are sleeping so that you can reduce your costs. You can also schedule some tasks to run when the data center has less workload and save more money. We will discuss all of these opportunities later in this book.
What if you want to implement Agile and DevOps practices? Cloud providers have very fast provisioning times, so you can deploy complex applications and the infrastructure associated with them, as it is no longer static, in a matter of minutes. And that makes a huge difference, which allows you to use that extra time for better testing or even to do more iterations, which in the end will translate into better code.
And regarding the everyday life of a developer, if you are worried because you may not be able to keep on using your favorite IDE or fear that latency while writing code could be a problem, or that processes might be more complicated, just give it a try – you will be delighted. Hosting your repository in the cloud should be easy and you will not notice the difference. And you can connect from anywhere, even while commuting back home if you realize that you forgot to submit a very important CL before leaving the office.
I hope that you have been convinced that running your code on the cloud is a great idea. Now, let me show you why I think that Google Cloud is the best cloud provider to do so.