[PYTHON] Comparison of GCP computing services [I want to use it serverless]

Overview

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).

Comparison

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 ×

Ease of implementation

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.

Cheap price

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.

Ease of management

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.

in conclusion

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

Comparison of GCP computing services [I want to use it serverless]
I want to use only the normalization process of SudachiPy
I want to know the legend of the IT technology world
I want to use both key and value of Python iterator
I want to use jar from python
I want to use Linux on mac
I want to use IPython Qt Console
I don't want to admit it ... The dynamical representation of Neural Networks
[AWS] [GCP] I tried to make cloud services easy to use with Python
I want to use the Qore SDK to predict the success of NBA players
I want to use MATLAB feval with python
I want to use Temporary Directory with Python2
I want to get League of Legends data ③
I want to get League of Legends data ②
I want to use ceres solver from python
I don't want to use -inf with np.log
I want to use ip vrf with SONiC
I want to customize the appearance of zabbix
I want to get League of Legends data ①
I want to use the activation function Mish
I want to use Python in the environment of pyenv + pipenv on Windows 10
I want to use PyTorch to generate something like the lyrics of Japari Park
GradCAM with 22 lines of code. tf_explain may be easy to use, I recommend it!
I want to detect images of cats from Instagram
I tried to summarize how to use matplotlib of python
I want to use self in Backpropagation (tf.custom_gradient) (tensorflow)
I want to grep the execution result of strace
I want to fully understand the basics of Bokeh
I want to use a network defined by myself in PPO2 of Stable Baselines
I want to install a package of Php Redis
I want to use OpenJDK 11 on Ubuntu Linux 18.04 LTS / 18.10
I want to use the R dataset in python
I want to use Linux commands at the command prompt! Use Linux commands at the command prompt instead of Git Bash
I want to increase the security of ssh connections
I made a function to crop the image of python openCV, so please use it.
I don't want to search for high para because it is IQ1 (how to use lightgbm_tuner)
I want to use the latest gcc without sudo privileges! !!
I want to use R functions easily with ipython notebook
I want to specify another version of Python with pyvenv
I want to start a lot of processes from python
NikuGan ~ I want to see a lot of delicious meat! !!
I want to color black-and-white photos of memories with GAN
[Python] I want to use the -h option with argparse
Comparison of how to use higher-order functions in Python 2 and 3
I want to judge the authenticity of the elements of numpy array
I want to use a virtual environment with jupyter notebook!
I want to know the features of Python and pip
Keras I want to get the output of any layer !!
How to use cloud voice recognition services of 4 major companies
I want to use VS Code and Spyder without anaconda! !! !!
I sent the data of Raspberry Pi to GCP (free)
I want to solve Sudoku (Sudoku)
I want to get the name of the function / method being executed
I want to manually assign the training parameters of the [Pytorch] model
I want to use a wildcard that I want to shell with Python remove
I want to use shortcut translation like DeepL app on Linux
I want to read the html version of "OpenCV-Python Tutorials" OpenCV 3.1 version
How to use Python Kivy (reference) -I translated Kivy Language of API reference-
I want to use an external library with IBM Cloud Functions
I want to create a pipfile and reflect it in docker
I want to check the position of my face with OpenCV!