官术网_书友最值得收藏!

Constraints

If you go serverless, you need to know what the vendor constraints are. For example, on AWS, you can't run a Lambda function for more than 5 minutes. It makes sense because if you spend long time running code, you are using it the wrong way. Serverless was designed to be cost efficient in short bursts. For constant and predictable processing, it will be expensive.

Another constraint on AWS Lambda is the number of concurrent executions across all functions within a given region. Amazon limits this to 1,000. Suppose that your functions need 100 milliseconds on average to execute. In this scenario, you can handle up to 10,000 users per second. The reasoning behind this restriction is to avoid excessive costs due to programming errors that may create potential runways or recursive iterations.

AWS Lambda has a default limit of 1,000 concurrent executions. However, you can file a case into AWS Support Center to raise this limit. If you say that your application is ready for production and that you understand the risks, they will probably increase this value.

When monitoring your Lambda functions using Amazon CloudWatch (more in Chapter 10, Testing, Deploying, and Monitoring), there is an option called throttles. Each invocation that exceeds the safety limit of concurrent calls is counted as one throttle. You can configure a CloudWatch alert to receive an e-mail if this scenario occurs.

主站蜘蛛池模板: 浠水县| 中山市| 神木县| 江口县| 潮安县| 眉山市| 灵丘县| 长乐市| 琼海市| 慈溪市| 中阳县| 阜康市| 理塘县| 新昌县| 崇文区| 惠东县| 白银市| 繁昌县| 始兴县| 中江县| 博野县| 友谊县| 华安县| 秭归县| 镇安县| 江华| 吴江市| 黄浦区| 嘉峪关市| 萝北县| 栾城县| 桃园市| 图木舒克市| 临泽县| 顺义区| 高平市| 定远县| 荥经县| 伊宁县| 兴宁市| 温宿县|