- 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:

- 極簡(jiǎn)算法史:從數(shù)學(xué)到機(jī)器的故事
- Web Application Development with R Using Shiny(Second Edition)
- iOS應(yīng)用逆向工程(第2版)
- Linux命令行與shell腳本編程大全(第4版)
- 算法訓(xùn)練營(yíng):提高篇(全彩版)
- NGINX Cookbook
- PLC應(yīng)用技術(shù)(三菱FX2N系列)
- Java高并發(fā)核心編程(卷1):NIO、Netty、Redis、ZooKeeper
- RubyMotion iOS Develoment Essentials
- LabVIEW數(shù)據(jù)采集
- Access數(shù)據(jù)庫(kù)應(yīng)用教程(2010版)
- Java高級(jí)程序設(shè)計(jì)
- Learning Alfresco Web Scripts
- Java編程指南:語(yǔ)法基礎(chǔ)、面向?qū)ο蟆⒑瘮?shù)式編程與項(xiàng)目實(shí)戰(zhàn)
- Hands-On Data Visualization with Bokeh