Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use ServerLess to realize Cloud Native

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article will explain in detail how to use ServerLess to achieve cloud native. The content of the article is of high quality, so the editor will share it with you for reference. I hope you will have some understanding of the relevant knowledge after reading this article.

The author is fortunate to have experienced IaaS (OS), CaaS (Container), and heard FaaS (Funtion) in the past two years, which is also the third stage in the field of operation and maintenance development. Today, I will explain this concept to you from the perspective of a system engineer who does not understand development and combined with previous series of articles.

This article comes from the user "StatLee" of Serverless community.

I. brief introduction

At first, when I heard about ServerLess, I thought it was similar to VPS or a brand-new development method with complete OS or semi-complete OS ecology, such as VM or Container. Later, I found that I got it all wrong.

Then FaaS (Funtion As A Service represented by ServerLess) is to refine and split the SaaS.

Traditionally, Application is the final form of business, but with the emergence of the concept of "micro service" led by development and "SRE/DevOps" led by operation and maintenance, traditional business operation and maintenance obviously can no longer meet the needs of the new generation of business. In order to better meet these new needs, realize:

Module division (that is, a function as a module, not a business as a module)

The purpose of minimum granulation change (that is, hierarchical change, the change interval is shortened through reasonable scheduling to achieve fast iteration).

Cloud vendors finally split the Function out of the previous "final form", and multiple Function are then formed into Application. In addition to the business benefits, this benefit can also support the split of Function as a service to be provided to external calls through simple API. From a commercial point of view, this model can provide more subdivided realizable areas in addition to the value created by Application itself.

So, the reason why ServerLess is so popular (at least on the surface) is that ServerLess is the best embodiment of the FaaS mentioned above.

II. Practical operation

Let's start to create today's protagonist, ServerLess (the python version varies with your business needs) to create a cloud function:

Create SCF (Cloud function, ServerLess)

From the point of view of the function of cloud function, the degree of integration with Tencent Cloud is relatively high. In planning, the author suggests to use VPC to construct cloud function application.

To pull the cvm list by interfacing with cvm apiv3 sdk, first put the SDK file in the directory where the cloud function resides.

Deploy with one click through the VSCode plug-in. VSCode is recommended as the main IDE. Whether the TKE used to construct the Django of API can be developed remotely through the Remote Development plug-in, or ServerLess can also be developed through the ServerLess ToolKit provided by Tencent Cloud (of course, most cloud vendors providing ServerLess provide Toolkit, and do not click under the Remote IDE window when installing ToolKit, otherwise it will become a remote installation). Basically, the experience is consistent.

Obtain ins-id and private network IP through CVM SDK, and then call the API constructed by Django to pass parameters.

The result call successfully adds data.

At this point, the actual operation is completed, which is equivalent to putting a "synchronous message" interface on the back end to ServerLess.

III. Scene

As described in the experiment, can ServerLess only be something like a "transponder"? No, in addition to the business module is in the "middle (forwarding, synchronization)" module type, in fact, ServerLess can also be combined with other products to achieve external output function.

ServerLess itself does not have the ability to release to the public, how to understand it? That is, ordinary operation and maintenance students start to see, why does this thing not even have an ip, where is the domain name defined, where is the port, and how to define the protocol type?

In fact, ServerLess does not have any of these, because, as mentioned in the brief, this is a product that is so fine-grained that you only need to pay attention to a certain Function in the App, so all the products under the Function, including OS, network, and App, do not have customization.

Although ServerLess itself does not have the ability to publish externally, this is not the case with API gateway. When ServerLess encounters an API gateway, cloud vendors usually support ServerLess to add (or register) to API gateway, which is equivalent to you can use the "power" of API gateway to enable ServerLess to achieve the function of external release.

ServerLess's development model has been adopted by many companies in the industry, compared to still using traditional environments (OS, middleware, choice of application language, building data layer, front and back end):

The pressure of operation and maintenance is much less, because we only need to focus on the adjustment and operation and maintenance of ServerLess's own operation parameters and architecture, but no longer need to pay attention to the operation and maintenance difficulties below Function.

Developers because ServerLess is generally provided by cloud vendors for full-link integration, coupled with the support of IDE plug-ins to basically achieve cloud development, flexible versions and environments can also ensure that the probability of release problems is minimized, at the same time, the intersection of development functions is reduced to a minimum, and the interference and dependence between developers is reduced.

For the company's business model, for example, corporate customers with a large number of visitors and market audience can not only make a profit in the business, but also realize the realization of the internal IT support system with the help of ServerLess.

ServerLess also has some problems, for example, because ServerLess is basically based on cloud vendors, for scenarios with hybrid clouds, the link quality of S2S is higher, of course, these will get smoother and smoother with the continuous optimization and iteration of ServerLess, so whether it's Dev or Ops, embrace and enjoy ServerLess.

On how to use ServerLess to achieve cloud native sharing here, I hope the above content can be of some help to you, you can learn more knowledge. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report