AWS Lambda Performance Issues

I use aws api gateway integrated with aws lambda (java), but I see some serious problems in this approach. The concept of removing a server and its application, scalable out of the box, is really nice, but here is the problem I am facing. My lambda does two simple things: confirm the payload received from the client, and then send it to the kinesia stream for further processing from another lambda (you ask why I do not send the stream directly and use only 1 lambda for all Operations. Let's say that I want to separate the logic and have an abstraction layer, and also tell the client that it is sending incorrect data.).

In lambda implementation, I integrated DI spring. So far, so good. I started doing performance testing. I simulated 50 concurrent users, each of which processed 4 requests every 5 seconds between requests. So what happened? In lambda cold start, I initialize the context of the spring application, but it seems that if there are so many simultaneous requests when the lambda does not start, this does some strange things. Here's a screenshot of how the context was initialized.

enter image description here

, , . , , "" , - "" (, 18 ), . , , , . , , , , . , .

, spring, ", , java-". , , (, 3s ). :

enter image description here

, ( ), , . 18 - , , - . , 18 , 7-8 - 6-7 4-5 , . , ( , ), .. 820 , 100 340 400 . , , - - . , , :

enter image description here

, , , ( ), .

, -, , , , - "" .

-200 . . ( ), . , , . , ( ), . ?

+4
2

18 , AWS . ~ 18 .

-, , !

lambda-200 lambdas .

AWS . 10 000 /, AWS !

+3

Kinesis API-. , , .

API , , Lambda .

+2

Source: https://habr.com/ru/post/1673486/


All Articles