Solve the serverless cloud cost conundrum
Adoption of serverless computing will skyrocket in 2022, according to 2022 CNCF Cloud Native SurveyThis growing popularity creates a potential risk of increased cloud spending unless businesses take a proactive approach to serverless costs through strategy, optimization, and monitoring.
Here are some tips on how to prepare your development team to proactively rather than passively address serverless cloud costs after your CFO has opened your first cloud bill once your serverless project is live. I will introduce
Learn pricing models of major cloud service providers
Choosing the right serverless computing solution starts with your cloud service provider (CSP). Even then, serverless brings you to a new pricing model that teams need to learn.Each major CSP offers serverless computing with its own pricing model.For example, Amazon Web Services Announcing Tiered Pricing For AWS Lambda, a serverless computing service. When such news dwindles, it’s often a signal to reconsider serverless pricing models.
Establish efficient coding practices in serverless projects
Introducing serverless computing into your cloud technology stack is a great time to check your organization’s coding practices. Adopting efficient coding practices in your serverless development projects is one of the first and most important steps you can take as part of your serverless computing cost optimization initiative. Coding practices that can help reduce the cost of serverless computing include:
- Minimize code size
- Using the Best Libraries
- Optimizing function performance
Optimization of functions from the design stage
Over-provisioned memory and CPU allocation are two common causes behind cost overruns in serverless computing. When you run a serverless function in your cloud application, CSP allocates resources according to the function’s configuration. Then, when it’s time to bill, CSP bills based on the amount of resources your application consumes.
Spending extra time during the design phase to determine the appropriate amount of resources each serverless function requires makes good business sense and minimizes costs.
Use compute only when you need it
Advise to train cloud developers to use compute only when necessary cloud zeroThey show an example of calling an API using a step function instead of a Lambda function. In other words, you pay only for the step function.
Set and track relevant serverless cost KPIs
Major CSPs and cloud management platforms include some form of key performance indicator (KPI) monitoring dashboard. You can also use observability tools like Datadog for KPI monitoring.monitoring Serverless KPIs It should be prominent in your project and deployment plan.
Central to managing and tracking serverless costs is adopting KPIs such as:
- Cost per execution. This metric reflects the average cost of executing a function once. Calculate the cost per execution by dividing the total cost by the number of times the function is executed. Tracking this KPI is essential. This will identify the most expensive functions to run and require optimization to reduce cloud costs.
- functional period. Function execution time is an important KPI to track because the longer the function runs, the higher the cost. By analyzing this metric, you can identify functions that are taking too long to execute and need optimization to further reduce costs.
- idle time. This may seem like a harmless KPI to track, but even if your serverless function is running but not doing useful work, such as waiting for input or output, CSP charges. Reducing idle time for serverless functions is another key tactic for reducing cloud spend while optimizing resource utilization.
Memory usage, CPU usage, call count, and error rate also contribute to higher cloud costs and should be monitored accordingly. Allow time to analyze trends and make it a point to discuss serverless cloud costs in your project report. Because it helps everyone learn how to use the cloud more efficiently.
Go all out when it comes to cost monitoring and alerting
Perhaps your organization’s Cloud FinOps Expertise and Practice Still in growth mode. If so, adding serverless computing to the technology stack can raise new concerns about cloud spending, requiring a holistic approach to managing serverless cloud costs. Here are some tips for achieving this:
- Support the cloud team’s learning curve by doubling analytics for billing and usage reports, at least in a serverless computing pilot project.
- Automate your cost management practices when possible, but don’t treat automation as a one-time “set and forget” event. Managing costs for your first serverless project should be a learning process for both the developer and his FinOps team members. Embrace iterative improvement.
- Implement cost monitoring and alerting for serverless computing projects early in the project lifecycle. You can use tools like AWS Cost Explorer to directly monitor your serverless costs and set up alerts when your serverless costs exceed your budget. Spend time repeating these alerts to ensure that your team is aware of unexpected usage spikes or application inefficiencies that unexpectedly drive up costs.
Consider using dedicated serverless cost optimization tools
Consider upgrading to a serverless cost optimization tool as part of your overall commitment to serverless computing. A new class of cloud optimization tools focused on serverless cost optimization.as an example Epsagon, IO pipeand Lumigowhich uses machine learning algorithms to analyze usage patterns and recommend further optimizations developers can make to their serverless computing applications to reduce costs.
Deploying serverless computing can add complexity to your overall cloud cost optimization efforts. However, there is no need to pose cost control conundrums or shock his CFO with skyrocketing cloud bills. If your team proactively adopts the right tools and processes, serverless cost management can be introduced into your cloud cost optimization program as smoothly as serverless computing is incorporated into your cloud technology stack.
Aggressive efforts like this will certainly set back cloud cost optimization initiatives by introducing serverless into the cloud tech stack.
Copyright © 2023 IDG Communications, Inc.
https://www.infoworld.com/article/3693318/solving-the-serverless-cloud-cost-conundrum.html#tk.rss_all Solve the serverless cloud cost conundrum