Summary: that day, Hi is sitting in the company coffee shop, thinking about an offer to operate and maintain MM Xiao V to watch a movie together at night, suddenly, the boss called...
This article is shared from the HUAWEI CLOUD community " [Quickly Fun HUAWEI CLOUD Development] See how little Hi uses DevStar to quickly get started with Serverless Architecture ", author: agile Xiaozhi.
Start-up company R: It has just been established and is committed to helping small and medium-sized enterprises with digital transformation through popular technologies.
Company members: boss R, programmer little Hi, senior expert big V, operation and maintenance girl little V...…
Note: The plot is required, the plot of this article is purely fabricated, please do not check in.
The programmer Xiao Hi last time used the HUAWEI CLOUD CLI combined with the batch script to perfectly help the operation and maintenance girl to get the batch expansion, and the love career had a double harvest, as if his life had reached the peak. After work that day, Xiao Hi was sitting in the company's coffee shop, thinking about asking the operation and maintenance MM Xiao V to watch a movie together at night. Suddenly, the boss called...
Little Hi thought to himself that his recent performance has been getting better and better, and his boss will definitely want to appreciate and raise his salary.
Boss: During the New Year’s Day event that just ended, our service has withstood the test. In the case of a large number of users accessing at the same time, the service can still respond quickly, which is very rare, but the event has passed, we no longer need a few There are hundreds of ECS and disks. In order to save costs, reduce the capacity of ECS and disks, and use them on weekdays. When our business volume increases or we engage in activities, we will expand our capacity.
Little Hi: Okay, boss, I'll take care of it now.
……
Little Hi's mood is mixed at this time, as if life has fallen freely from the peak to the trough. "It's so easy to say...", Xiao Hi muttered in his heart, whether to expand or shrink, you need to understand the number of users that the service needs to carry in daily scenarios, and do in-depth performance testing. If you rush your head Shrink, if there is a problem with the service, how can you explain it like the boss... Hey! ! !
At this time, senior expert Da V heard Xiao Hi's sigh and immediately asked him what happened.
……
After learning about Xiao Hi’s confusion, senior expert Da V smiled and said to Xiao Hi that it is already 2021. Why not take this good opportunity to try to upgrade the architecture? The currently popular Serverless architecture can just solve your problems. Let me introduce to you the specific commercial value that Serverless will bring to users:
Reduce operation and maintenance requirements
- Serverless decouples applications and servers. There is no need to estimate resources before the business goes online, and there is no need to purchase and configure servers;
- Serverless also further reduces the workload of the underlying operation and maintenance. After the business is launched, there is no need to worry about server operation and maintenance, but all are handed over to the cloud platform or cloud vendor;
Reduce operating costs
- Serverless applications are executed on demand. The application will only be loaded and run when there is a request to be processed or when an event is triggered. In the idle state, the application of the serverless architecture does not occupy computing resources;
- When using Serverless products, users only need to pay for the computing resources required to process the request, not for the resource occupancy during the idle period of the application;
Shorten the iteration cycle and online time
- Serverless architecture brings further business decoupling, application functions are decomposed into several fine-grained stateless functions, and development can focus on the rapid development and launch of single functions;
- At the same time, the disassembled cloud functions can also be independently iteratively upgraded to achieve faster business iteration and reduce the online time of the function;
quick trial and error
- Using the simple operation and maintenance, low cost, and fast online capabilities of the serverless architecture, you can quickly try new forms and new functions of the business;
- Utilizing the strong elastic expansion capabilities of Serverless products, there is no need to worry about resource expansion when the business is successful;
Little Hi: (Really?)
Looking at the dubious expression of Xiao Hi, senior expert Da V went on to say, don’t just talk about fakes. In this way, HUAWEI CLOUD DevStar provides a wealth of scenario-based templates. Among them, the FunctionGraph template for HUAWEI CLOUD functions can help you understand quickly. Serverless service architecture, where you can quickly deploy a cloud function template to the HUAWEI CLOUD FunctionGraph service, go and experience it...
Little Hi excitedly entered in the address bar of the browser: https://www.huaweicloud.com/
Open HUAWEI CLOUD, select "Developer -> Resource Tools", and enter "HUAWEI CLOUD Developer Tools":
Select "Resource Tools -> DevStar", and then click "Use Now" to enter the DevStar template center page.
On the DevStar template center page that came into view, I saw a template called "AI Recognizing Pictures and Writing Poems" at a glance. It is located under the category of "Function" development scenes, and the "Function Workflow F" is displayed at the bottom of the template card. unctionGraph" gray label, this should be the FunctionGraph template for HUAWEI CLOUD functions mentioned by Big V...
After clicking the "AI Recognition Picture and Poetry" template card, it describes in detail how to deploy the template code to the FunctionGraph of HUAWEI CLOUD function workflow:
Fortunately, Xiao Hi already has a real-name certified Huawei account. Click the "Preview Code" button on the upper right to keep the default values of the template parameters unchanged, and then click the "Deploy" button on the lower right. After logging in, keep " The default Region" remains unchanged, click "Next", the code is already deployed...
What? Little Hi can't help but sigh, I didn't even choose ECS... Little Hi excitedly clicked the "Copy" button, and after typing on the new browser tab, a beautiful picture came into view:
After uploading a picture, a beautiful poem is written on the canvas:
"Understood, the big V really deserves its reputation", then I will first download the code of this template and then check it out with the official documentation of the Huawei Cloud FunctionGraph service:
"When the new system architecture is implemented, the operation and maintenance MM Xiao V can have a lot of time to watch movies with me, Xiao Hi muttered...".
Some of the contents of this article refer to the following articles:
- Serverless Series (1): Introduction to Basic Concepts
https://www.infoq.cn/article/s101GtcCV05_2AgKo8GD
Click to follow, and learn about Huawei Cloud's fresh technology for the first time~
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。