- Building Serverless Web Applications
- Diego Zanon
- 187字
- 2021-07-15 17:31:23
Cost model
Suppose that you have built an online store with serverless. The average user will make some requests to see a few products and a few more requests to decide whether they will buy something or not. In serverless, a single unit of code has a predictable time to execute for a given input. After collecting some data, you can predict how much a single user costs on average, and this unit cost will remain almost constant as your application grows in usage.
Knowing how much a single user costs and keeping this number fixed is very important for a startup. It helps to decide how much you need to charge for a service or earn through ads or sales to have a profit.
In a traditional infrastructure, you need to make payments in advance, and scaling your application means increasing your capacity in steps. So, calculating the unit cost of a user is a more difficult task and it's a variable number.
In the following diagram, the left-hand side shows traditional infrastructures with stepped costs and the right-hand side depicts serverless infrastructures with linear costs:

- 零基礎搭建量化投資系統:以Python為工具
- 大學計算機應用基礎實踐教程
- 數據庫系統原理及MySQL應用教程
- Production Ready OpenStack:Recipes for Successful Environments
- Hands-On Microservices with Kotlin
- Learning Raspbian
- Julia高性能科學計算(第2版)
- 區塊鏈技術與應用
- ASP.NET程序開發范例寶典
- Web性能實戰
- HTML+CSS+JavaScript編程入門指南(全2冊)
- 零基礎C#學習筆記
- AngularJS UI Development
- Java程序設計教程
- Spring Boot學習指南:構建云原生Java和Kotlin應用程序