current position:Home>AWS serverless design lambda
AWS serverless design lambda
2022-04-29 07:57:15【zoobuzas】
AWS serverless Design -Lambda
1. There is a limit to the number of simultaneous executions
Lambda The principle is actually the increasing container technology . Every request is to open a container .
Concurrent execution =( Calls per second )x( Average execution time ( second ))
for example , One Lambda The average time of the function is 10 second , Send out every second 100 Two events will be executed at the same time 1000 individual Lambda function , That's the limit .
The wonder is , In fact, the restrictions in each region of the world are not the same , Like the United States, it seems 2000 Limit .
Ordinary areas AWS Lambda In the same area of the same account, it is limited to 1,000. When the limit is reached , Further function calls are restricted ( throttle ). Note that the same account , It's not the same function .
There are several ways to avoid limitations .
One of them is “ Try processing again ”. For synchronization , When restrictions occur ,Lambda Function will return 429 error . If this error occurs , The caller of the function will perform the retry process . In the case of asynchronous processing , It will take the longest 6 Automatically retry every hour .
Besides , stay AWS Lambda Under the circumstances , Apply to relax the ceiling ,
( however , It's hard to accept ).
Monitoring and error analysis are very complex
Multiple functions work together in serverless applications . therefore , It's actually more difficult to monitor than normal applications .
Lambda It can also be used for Java and Python multilingual . however Lambda Most of the runtime provided is hidden inside , When problems occur, it is difficult to analyze and isolate them for inspection .
Of course use AWS CloudWatch You can see enough error messages in the log . General investigation is also enough. In fact , Compared with others, it's already very good . such as splunk,Nmap these
Execution time limit
For those with limited execution time AWS Lambda, The execution time is 15 Within minutes . If there is one execution, it will exceed 15 Minutes , You need to divide and parallelize processes .
And need to consider Lambda Restrictions on server free services other than .
for example ,API Gateway + Lambda. under these circumstances , You should also consider API Gateway restrictions . stay API Gateway Under the circumstances , The norm is that it will be at most 29 Timeout in seconds . therefore , The value will be in 29 Seconds from Lambda The function returns , The process will then execute asynchronously . If the process is difficult to divide and parallelize , You need to use Amazon EC2 Implementation requires 15 A process of minutes or more .
AWS Lambda Not to be used alone
Not to be used alone AWS Lambda perform Lambda function . To carry out Lambda function , You need to set a trigger to trigger the process to start in another service resource .
perform Lambda There are two main types of triggers . The first is the type of function that is called synchronously with the trigger . This applies to API Gateway And manual execution . The second is to detect the occurrence of events and execute functions asynchronously . This includes from Amazon S3、CloudWatch Log、CloudWatch Events Such as running .
oudWatch Log、CloudWatch Events Such as running .
copyright notice
author[zoobuzas],Please bring the original link to reprint, thank you.
https://en.qdmana.com/2022/119/202204290550503662.html
The sidebar is recommended
- Which one charges less for opening a securities account and how to open the account
- Spring MVC notes 02 domain object sharing data, view, restful, httpmessageconverter, file upload and download
- Httpclient setting timeout
- Command line / Python uses pdf2htmlex to convert PDF to HTML
- [front end three swordsmen III] analysis of JavaScript scalpel Part II
- How to choose the front-end learning path
- Finite element parametric element, calculation, theoretical problems
- Handwritten CSS modules to understand its principle
- Front end browser debugging tips
- Performance problem analysis guide for enterprise JavaScript applications running in production systems
guess what you like
CSS aspect-ratio All In One
Actual combat of vue3 project --- Zhihu daily --- details page
Actual combat of vue3 project --- Zhihu daily --- home page function
Great Wall Motors is falling endlessly! The boss has lost 150 billion yuan in half a year, and the performance of the new energy sector has improved
Nginx tips batch shutdown process
Openresty introduces nginx_ upstream_ check_ Module module
Nginx multiple servers_ How does name match
Why does the front end still prompt cannot post, and the error reported by the back end still prompt null pointer?
HTML Li set margin: 50%, but the width of the outermost div is the standard
Are there any specific steps to create a prototype, such as JavaScript?
Random recommended
- How does HTML5 display the value obtained from the database in the specified area
- Problems related to nginx rewriting interface
- What happens when you open a CSS file in eclipse without responding
- React download local template can be downloaded locally, but the deployment online download is blank
- @Babel / traverse official example running error: typeerror: traverse is not a function
- The click event of jQuery has no effect
- How to learn from non professional background?
- Usage of API documented as @since 1.8+ less... (Ctrl+F1) Inspection info: This inspection finds all
- Configuration Vue of webpack
- Introduction to nginx (learning notes)
- Is the financial management class of qiniu school true? Can you learn how to manage money in free lessons
- How does Java randomly get elements from a list
- Use of Vue on in Vue
- Use of Vue router
- Vue basic syntax
- Use of webpack
- Vue diff algorithm
- CSS -- Text gradient from top to bottom
- Routing: Vue router
- Leetcode 658. Find K closest elements
- How to configure Vue in Vue project config. JS to solve cross domain problems
- Centos6 makes nginx-1.21.6-rpm package -- the way to build a dream
- [vue2-sgg v] vuex
- [vue2-sgg vi] route Vue router guard
- [vue2-sgg VII] Vue export and deploy to nginx --- UI component library (element UI...)
- Chapter 12 Ajax
- Clion remote debugging ubutun server, blood lessons
- The latest vue-i18n international plug-in realizes language switching (with source code)
- Vue monitors watch usage
- Vue encapsulates Axios to the full version of the calling interface (code source code)
- Watch data monitoring in Vue and detailed explanation of various attributes in watch
- Vue encapsulates Axios to call interface Full Version (code source code) latest recommendation (II)
- Vue encapsulates Axios to the full version of the calling interface (code source code)
- Ajax usage based on JQ
- Vue project optimization
- Vue - form generator form code generation
- Data acquisition in vuex is assigned to the local problem, and when is vuex data assigned to the local problem
- The modal box component is encapsulated in Vue, and the animation effect in Vue
- Swiper, the application of swiper in Vue, and various versions of swiper are applied in Vue projects
- Python——ReadTimeoutError: HTTPSConnectionPool(host=‘files.pythonhosted.org‘, port=443)