Three major problems and solutions of serverless computing

Claire | 2019-02-20 Source: cloud computing Number of comments (0)

Follow these recommendations to eliminate non computing bottlenecks, avoid vendor throttling and queuing, and maintain server free response.

Serverless computing is very popular now. Everyone is either investigating it or has deployed it. Don't fall behind, or you will miss it!

What's so fussy about? Server less computing provides an infrastructure that allows server resources to be applied to the system for expansion when needed, thus effectively using computing power as a utility for the system to use according to load requirements.

This means that no one needs to care about individual servers at runtime (frankly, no one has ever cared about them). Economies of scale make it cost-effective to outsource the management of a batch of servers to cloud providers. By minimizing contracts, the "serverless" interface makes this outsourcing relationship as simple as possible.

As human beings, the first reaction of many people is to try to replace the charts, traffic lights and alarms they attach to the server with charts, traffic lights and alarms related to their serverless function. Unfortunately, however, this does not fundamentally address the challenges of application management. Because just as no one really cares about servers, no one really cares about isolated serverless functions.

What people really care about is the service level provided by the system to users. This means that, in order to be valuable, monitoring must focus on possible errors. In the absence of servers, "errors" mainly means trying to violate the laws of physics, because "running out of server capacity" is no longer in the scope of discussion.

What is a typical serverless problem? How do they behave? Here are the three major problems that plague serverless deployment and the ways to eliminate them.

Cold start cost

Question: This is often discussed in serverless systems. To maximize utilization, serverless providers sometimes choose to turn off inactive features completely. When the load restarts, the function startup cost will have a certain impact on the response time. When a business function is composed of many serverless functions linked together, the impact can be compounded.

Solution: Many users will manually ping their functions to ensure that they are alive. In order to effectively apply this policy to the network of linked services, it is necessary to understand the end-to-end relationship between them, so that all services in the dependency chain remain active, thus making end-to-end tracking of business transactions essential.

throttle

Problem: The serverless platform limits the number of concurrent requests that the serverless function will execute, usually at the account and single function levels. Once the concurrency limit is reached, the queued user requests will become more, thus extending the response time. Although it seems counter intuitive to throttle the potential and unlimited computing resource pool, this can indeed prevent the bill from potentially growing indefinitely (don't forget that capacity is charged by consumption).

Solution: raise the threshold! Or at least, ensure that they are set up appropriately to meet any non functional requirements in response time and concurrent use. Similarly, end-to-end visibility is also necessary, so that you can accurately judge the throttling situation and the impact of throttling on the end user experience.

Non computing bottleneck

Question: OK, you have removed all serverless throttling, so now your function will support as many concurrent requests as possible. The problem is solved! But sadly, this is just a diversion of the problem. Sooner or later, your function will need to stay in a certain state somewhere. Depending on their location, you may encounter more trouble. Soon, you will need to wait to read or write data, which means that your infinitely extended anonymous function will wait for data access - and you will be charged for this futile waiting process.

Depending on the persistent storage, the exact reason why a function hangs like this will vary.

Cloud data storage: Cloud data services are becoming more and more flexible, but many services still need to configure resources based on concurrent reads and writes.

Traditional system: No function is isolated. Many serverless enterprise users are using serverless functions (sometimes mainframe, sometimes traditional server based deployment) to package existing systems. Although it is easy to raise the threshold to allow function expansion, this only means that it is easy to cover the back end that cannot be easily extended.

Solution: To ensure that your back-end system can handle the theoretical maximum load, please adjust them according to your function throttling. This will help ensure that the system runs smoothly from end to end, avoiding unnecessary costs and customer dissatisfaction. In some cases, you may need to copy data so that different systems can access them from different places. (Of course, the cost of doing so is to increase the complexity of data management and the risk of data inconsistency.)

Similarly, it is very important to understand the end-to-end flow through the system at the transaction level for identifying and alerting bottlenecks in production and analyzing the system end-to-end.

Focus on serverless development, operation and maintenance

I heard you say, "But I'm a developer! Why should I care about this crazy, non functional deployment?"

The biggest implication of no server is that the configuration is now code (or at least part of it). In a serverless environment, developers now deliver the entire software package to production, not just functional parts.

This in turn means that once you debug production problems with the IDE, you'd better be familiar with some kind of performance management solution in a serverless environment, because at least half of the "vulnerabilities" may be related to deployment. This is no longer their fault (development, operation and maintenance). The fate of the system is entirely in your hands - end-to-end visibility at the application level will become critical to you.

label:

Focus on cloud computing, scan two-dimensional code, and focus on HostUCan cloud computing

There are good articles that I hope webmasters can help share and promote I want to contribute

You need to log in to comment Login| Registration

No comment