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

Using the three steps of function calculation to realize the online Service of Deep Learning AI reasoning

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

Share

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

At present, deep learning is widely used, in which the online service of AI reasoning is one of the important landing application scenarios. This article will introduce you to the best practices of deep learning AI reasoning in functional computing deployment, including one-click deployment and installation of third-party dependencies, one-click deployment, local debugging and stress test evaluation, fully demonstrating the agile features of functional computing, automatic auto scaling, operation-free and comprehensive monitoring facilities.

1.1 Overview of DEMO

Identify whether the animal in the photo is a cat or a dog by uploading a picture of a cat or dog.

DEMO sample effect entry: http://sz.mofangdegisn.cnDEMO sample project address: https://github.com/awesome-fc/cat-dog-classify

Activate the service

Free function calculation, pay by quantity, function calculation has a large amount of free.

Free activation of file storage service NAS, paid by quantity

1.2 solution

As shown in the figure above, when multiple users access the reasoning service through the external url, it doesn't matter if there are hundreds or thousands of requests per second. The function computing platform will automatically scale to provide enough execution instances to respond to users' requests. At the same time, function computing provides a comprehensive monitoring facility to monitor the operation of your functions.

1.3. Comparison between Serverless solution and traditional self-built service scheme 1.3.1 excellent engineering efficiency self-built service function calculation Serverless infrastructure requires users to purchase and manage undeveloped efficiency in addition to the necessary business logic development, you need to establish the same online operating environment A series of problems, including the installation of related software, service configuration, security updates, etc., only need to focus on the development of business logic. With one-click resource scheduling and deployment of FUN tools, the starting cost of learning may use K8S or elastic scaling (ESS). If you need to know more about the meaning of products, nouns and parameters, you can write the function code of the corresponding language to 1.3.2 self-built service function calculation of Serverless flexible high availability requires self-built load balancing (SLB), auto scaling, capacity expansion speed is slower than FC FC system inherent millisecond level auto scaling, fast bottom expansion to cope with peak pressure Operation and maintenance monitoring alarm-free query ECS-level metrics to provide more fine-grained function execution, latency and logs of each access function execution, more perfect alarm monitoring mechanism 1.3.3 lower cost function computing (FC) inherent automatic scaling and load balancing features, users do not need to purchase load balancing (SLB) and auto scaling. Users with obvious peaks and troughs access scenarios (for example, only part of the time has a request, other times do not even have a request), choose to pay on demand, only need to pay for the actual use of computing resources.

It has the advantage of low cost for obvious peaks and troughs or sparse calls, while maintaining flexibility. After the business scale becomes larger, there is no technology switching cost. At the same time, the growth of financial costs combined with prepayment can be kept smooth.

When some requests remain stable, the higher unit price of on-demand payment can be solved with prepaid payment. Function calculation cost optimization best practice document.

Suppose there is an online computing service, because it is CPU-intensive computing, so here we take the aPCge CPU utilization as the core reference indicator versus cost. Take the total computing power of 10 C5 ECS for a month as an example, and the total amount of computation is about 30%. In the scenario, the CPU resource utilization of each solution is roughly as follows:

The following billing model is estimated from the above figure:

Pre-paid 3CU for function calculation: 246.27 yuan per month, with computing power equivalent to ECS computing type C5ECS computing C5 (2vCPUMagol 4GB) + cloud disk: 219 yuan per month, by quantity: 446.4 yuan per month, 10 Mbps SLB: 526.52 yuan (some traffic assumptions are made here), auto scaling is free of charge for saturated use The cost of a machine calculated by the function is about 2 times the average CPU utilization cost of the pay-per-view C5 ECS. The SLB total function calculates the combined payment > = 80% 738 pay X (246.27 pay 3 percent X) none

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