Here's why I used GCP last year and ended up with Cloud Run. The GCP services listed here are as follows.
The prerequisites are as follows.
--Manage as application --The price is cheap --Serverless --Using Python
The viewpoints here are "ease of implementation," "cheap price," and "ease of management." The ease of management here is "** Ease of management as an application **". From the conclusion, I think Cloud Run is good from this point of view. If you don't mind being the Beta version, I think this is enough (as of January 7, 2020).
Also, I didn't put out GKE here because I'm not familiar with container technology and I touched Cloud Run first (By the way, Cloud Run is also a container service. I was studying before, so I look back on it. However, even beginners can basically implement it by referring to the manuals and blogs).
I will put the comparison table first. It's a completely personal impression.
Service name | GAE | GCE | Cloud Function | Cloud Run |
---|---|---|---|---|
Ease of implementation | △ | × | 〇 | △ |
Cheap price | × | × | 〇 | 〇 |
Ease of management | 〇 | × | △ | 〇 |
Here, the comparison is based on "the amount of essential knowledge". In this case, other than Cloud Function, configuration files etc. are required in addition to the source code. GAE is an instance issuance condition, GCE is a rental server in the first place, and Cloud Run is a container service, so it tends to require a little more knowledge than Cloud Functions with only source code.
It's just like looking at the GCP price list. GAE and GCE are charged for operating hours. GAE is charged based on the number of instances issued and the time, so if you make a mistake in the settings, you will be in a state like bill shock. Cloud Functions and Cloud Run are charged by the number of accesses. Strictly speaking, Cloud Run is also charged for the usage time of CPU etc., but there are some articles that it is cheaper than GAE.
Simply put, this is the clarity of the folder structure during management and the small number of configuration files. Cloud Functions requires "one file for each function", so if you have your own library that you use in common, the file structure will start to become complicated. With GAE and Cloud Run, if you want to reduce the number of files, there will be only a few files, and it is easy to maintain the structure of a general workspace. GCE is a rental server, so it's out of the question in this sense.
In this way, it seems that there is not much difference between Cloud Functions and Cloud Run, but in my case I had a little knowledge about containers, so the ease of implementation is not so disadvantageous, so Cloud Run is better. Is adopted. However, since there are some examples in the manual, I think that it is a close ruling to make it "△" in Cloud Run. I feel that the true value of Cloud Functions is "adding event processing to GCP services", so I think it's a bad idea from the perspective of "as an application" in this article.
Here, the above comparison is made, but in the end, I think it is better to select it depending on how you want to use it. This time, the setting of "serverless" narrows the range of selection. If you want to use GCE for cloud computing, you can use GCE obediently.
Recommended Posts