❝
I’m Xiao Liu, a newcomer to writing for another blog. Once I had a conversation with the boss, I stumbled across a plus-one item for a learning platform called Digging Gold. One item for a visit was a Chrome plugin and one item was a smooth one for Xi Xi (●’◡’●). I saw an article posted by Nuggets Sauce
Just some time ago, touch the fish 🦑, learn. So there is this article, the new code word, a lot of care!
❞
Although this theme, there have been a lot of masters out of the textbook, but I still want to learn their own output to share with you!
Let’s take a look at the evolution of cloud computing
Virtual cloud computing:
- IaaS infrastructure as a Service [Email, wechat, Alipay, etc.]
- PaaS platform as a Service [Database service, big data computing platform]
- Saas software as a service [Cloud server, CPU, hard disk]
We may have only heard these three words in the early days, but with the development of cloud computing, a new computing model has been proposed: Faas
That’s Serverless.
“Introduce Serverless“
Faas: Function as a service
Here you may not understand, let me draw a picture to briefly describe, drawing tool: WWW. “draw”.io/
Function as a service
In most cases, a service can be abstracted as a function that requires a certain amount of input and, after processing, produces a certain amount of output, which is a high degree of abstraction.
Lambda starts with AWS.
Faas are also called Serverless.
❝
Serverless does not really have no server, but users do not care about the operation and maintenance problems, focus on writing logic, service running in the end
Users with one or more servers do not need to care. Because the server management and resource allocation parts are not visible to users
❞
Various cloud platforms
At present, these common cloud platforms exist in China
- Ali cloud
- Tencent cloud
- Baidu cloud
- Huawei cloud
- There are all kinds of little-known small clouds, such as what seven niuyun, Jinshan cloud
“Foreign cloud platforms“
-
AWS
-
Begin
-
Netlify
-
heroku
.
Although my favorite cloud platform is heroku, because it’s so strong! The background of the most powerful cloud is AWS, almost all clouds copy it, including, is the origin of the earliest, but Ali, Tencent or it copy the pants are not left
When we take into account the poor network here, we will take Tencent cloud as a reference example to take you to the actual operation, simple use of Serverless
Open: https://console.cloud.tencent.com/
After we go to the home page, we search for cloud functions
Tencent cloud operation
Create a new function service
There are a lot of languages out there, and I like Node, so I’ll go with Node
I’m just going to call this function whatever it is
Thus, the service for a function is created. This code just returns an asynchronous return OK
'use strict';
exports.main_handler = async (event, context, callback) => {
return{
json:"OK";
}
};
Copy the code
However, the service of a function can be accessed in several ways:
Click access path:
If you have a database service, add the database package to the function code above and access it.
Advantages of Faas:
- stateless
- Functions run in container mode. Users do not need to pay attention to details. Containers are automatically expanded according to QPS to save resources.
🏆 issue 7 | all things can be Serverless technology projects