In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article is about how to quickly migrate traditional LB public network business to Serverless. The editor thinks it is very practical, so I share it with you. I hope you can get something after reading this article. Let's take a look at it with the editor.
Is it difficult to trigger Serverless cloud functions? Is the function trigger too complex to match? Unable to translate traditional LB public network services? SCF now fully supports Cloud Load Balancer,CLB triggering. Provide a service-level access function solution, which is suitable for scenarios with more enterprise nodes, historical services in CVM, containers, self-built data centers, and heavy service and more visits.
Through the CLB trigger, you can deeply interface with the public network access service of the Serverless function, helping developers to smoothly migrate the traditional architecture to Serverless, providing a public network access and Web access experience with lower cost, easier operation, and more convenience.
Advantages and characteristics of CLB Flip-flop
In the scenario of massive function calls, it is more friendly to enterprise developers and is more cost-effective than other methods.
Serverless service management in IP dimension is supported, which can be combined with domain name resolution by region to help users trigger the execution of different functions in different regions. Improve the overall availability of functional services.
Service-level encapsulation. A single LB can encapsulate CVM, container and Serverless services at the same time. Serverless services can be more easily cut into the core services of the business system, and can be directly routed to the function to do feeder capabilities through CLB triggers. There is no need to bind the domain name again and deconstruct the service.
WAF protection. CLB can directly intercept illegal requests with WAF products to provide more professional WEB application service protection.
SSL's own certificate is supported. The certificate service of Serverless application layer can be implemented through CLB, and SNI multi-domain name certificate binding is supported.
Typical application scenarios of CLB triggers
Typical scenario 1: second kill / snap buying activities
Second kill-rush buying activities require high flexibility in the application of overall resources, and are closely related to the backbone scenarios of the business. Generally speaking, it is a relatively independent module in the business system, which is easy to migrate and transform. And it can be seamlessly supported to the cloud function through the capability of CLB. The overall billing is much more friendly than the billing scenario based on the number of calls, and the migration cost is relatively low. The cross-domain problem of CORS can be easily solved under the same domain name.
Typical scenario 2: auxiliary system architecture
Such as non-backbone WEB business, order system, acquisition system, BI analysis and other non-backbone scenarios that are sensitive to peak cutting and valley filling, the overall migration cost will be lower and the migration benefit will be large.
Typical scenario 3: separation of dynamic and static services
When the volume of business requests is large, we can distinguish between static and dynamic requests of the website, and distribute them pertinently, so as to effectively reduce the back-end load pressure. Dynamic requests can be processed by separately deploying load balancers and associated Serverless services; static content can be optimized by accessing CDN services and optimized by object storage, which significantly improves the loading speed.
Typical scenario 4: same domain name, region-level access service
When the business requires a high level of region, you can use CLB to partition the function at the region level.
Configuration and usage guidelines for CLB triggers
Create a "load balancer" instance and a "listener" resource in the CLB console
Bind functions that need to be accessed in the CLB console or function console (single function single URL binding is supported for the time being)
Edit the function code (need to be returned according to the specific response integration format, see the product documentation for details)
Response integration demo code:
#-*-coding:utf-8-*-def main_handler (event, context): html= "CLB Runing Now. Return {"isBase64Encoded": False, "statusCode": 200,200, "headers": {'Content-Type':' ccc'}, "body": (html) # "body": ('% s% s'% (html,event))} above is how to quickly migrate traditional LB public network services to Serverless The editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.