![AJ Stuyvenberg](/img/default-banner.jpg)
- 47
- 29 134
AJ Stuyvenberg
United States
Registrace 2. 03. 2014
How Lambda made container cold starts 15x faster
How Lambda made container cold starts 15x faster
zhlédnutí: 968
Video
STOP using Lambda layers (use this instead)
zhlédnutí 1,6KPřed 8 měsíci
STOP using Lambda layers (use this instead)
No Trespassing - Legal Antenna BASE jumping
zhlédnutí 546Před 4 lety
No Trespassing - Legal Antenna BASE jumping
Losing and Finding my GoPro while BASE jumping
zhlédnutí 1,2KPřed 8 lety
Losing and Finding my GoPro while BASE jumping
Solo B.A.S.E Jump from the High Nose, Lauterbrunnen, Switzerland
zhlédnutí 620Před 8 lety
Solo B.A.S.E Jump from the High Nose, Lauterbrunnen, Switzerland
You’re amazing man I’d like to see a tutorial on how to create lambda functions from scratch
Thanks for the kind words! I'm happy to do that, we create a ton of functions from scratch all the time
please kill the background music in the future. hard to hear you clearly. thanks!
Thanks! I'll try to fix the mix. I always ask chat when I start how the audio is, but will adjust further.
Interesting! AJ, what's the impact of this on costs.
404'th subscriber
Yoooo thank you!
Great stream. Thank you 😊
When the stream quit I thought it was the cameraman falling off the stand.
LMAO
Also I'd love to see a graph or some type of visualization on what percentage and specifically which parts of my code is already cached. I guess AWS would never do this
I agree, but mostly for the sake of curiosity. I'm not sure what actionable insight we'd get from that information, but it would be interesting!
love it! Thanks for the explainer. We were wringing our hands wondering if we should switch from zip to container based after getting close to the 256mb limit and fist fighting with layers. In the end we did and looks like it was a good choice.
So glad you enjoyed it! Definitely avoid using Lambda Layers (with a few exceptions). I did another video on this
why u in jail?
I swing by proactively every now and then, as a preventative measure.
Hey @astuyve, Thanks for this guide, its very helpful. I want to take this problem further and ask if you Did you ever observer SQS consumer Lambda scaled more than 1250. We have set lambda's reserved concurrancy to 2000 and we have almost millions of messages in sqs queue, And our lambda is not erroring or anything and we observe that lambda does scale to 1250 and then stopped. I think this is some sort of Limit from AWS. Did you ever observed something like that?
Hey! Great question. 1250 is the new maximum number of concurrent invocations consuming from one queue, you can find that limit in the new announcement blog for faster scaling (aws.amazon.com/blogs/compute/introducing-faster-polling-scale-up-for-aws-lambda-functions-configured-with-amazon-sqs/) as well as the docs. I'd suggest increasing the batch size so each invocation receives more messages, and then increasing the RAM and optimizing the function code to process multiple messages at a time. Good luck!
You rock man, keep doing what you are doing! Thank you.
Thank you so much for the kind words, it means a lot and I sincerely appreciate it!
dang, shoulda read the docs. many such cases
crazy how often that seems to be the case!!
So much ROI for such a small change
Exactly! Super simple, instantly boosts performance by ~5x or more.
very productive, these small but efficient tips can really save a day.
Thanks, glad you're enjoying it!
🌸 Promo*SM
just curious: how would you compare using partial batch response vs pushing the failures into DLQ? is it fair to say that partial batch response is good for temporary failures (since it'll just retry), but I would need to use DLQs to put a limit on the overall number of retries for a given message?
Hey! Yeah great question. If the failure isn't temporary you'll of course need some kind of fatal-handling system. If I don't expect to re-drive messages, I usually just set a max attempts value and then write them to logs on the last attempt.
Thank you for the reply!@@astuyve Do you mind elaborating how would you set a max attempts value? (If you push the records back into the queue using partial batch response, is it possible to include some kind of attempt number?) I am new to Lambda and SQS and really appreciate the content you're putting out!
Hey! AWS tracks that for you, so you simply have to mark the messageId in the batchItemFailures response and SQS will keep track of the number of attempts for that message. No need to change anything in your own code besides the example I've shown here. Glad you are enjoying it, and good luck on your learning journey!
Very informative video! You rock, thank you. I'm curious about your thoughts on our use case: The primary reason we opted for layers was due to the significant speed boost it provided our CI/CD process, shaving off about 5-10 minutes by uploading our node_modules as a layer. In our architecture, lambdas of the same service share the same modules (similar to what you'd find in a non-serverless, microservice environment), so instead of each lambda consuming around 200MB, each one only uses 2MB, and the layer is uploaded just once. I would be really interested to know your thoughts on our use case and solution. Do you think it's an abuse? Would you recommend a different pattern? Thanks!!
Thanks for the kind words! My biggest concern in your case is safe deployments. Unless you're using Lambda versions + aliases, you'll be unable to add/update a dependency without fully backwards compatible code without risking Lambda errors for at least a few seconds because the updateFunction and updateFunctionConfiguration API calls are asynchronous. When I ran into this with Vercel, those functions errors out for about 6 seconds until both operations were complete. This can be avoided with aliasing, but you still risk dependency smashing. Either way, I hope you use what works best for you. Good luck!
@astuyve Wow, very interesting, that's definitely good to know! Yes we are using versions and aliases because of provisioned concurrency which is required is, so we set is as a basic requirement for a stack. By the way, have you encountered issues where, even though provisioned concurrency is configured, Lambdas still experience cold starts? This happens even with regular traffic, not just bursts. It’s something that occurs quite randomly for us, and we can't find the root cause… Also we recently started using Datadog for serverless applications and are really excited about it. 😊
@@user-me8ec7zr5p Glad you're liking the product! Yes I've seen this happen with Provisioned Concurrency even with regular traffic, as ever so slightly (occasionally) there are no warm instances to serve the function. I'd check the lambda concurrency metric to see if you're bumping close to your PC value. If that function is nowhere near the provisioned capacity, I'd probably open a bug with AWS and ask.
Great video!
Thanks!!
Great breakdown and explanation, AJ! 👏
Thanks so much Aaron!!
is this video sped up? The AWS console is no where near this responsive lmao
Hahaha no, not sped up. I'm just close to us-east-1
Great video, keep them coming!
Thank you Tomasz!
Subscribed! 🎉
AARON FRANCIS omg you dropped this 👑, thank you!
@@astuyve I gotchu!
Great video, AJ! I agree with your perspective here. Lambda layer are often unnecessary and they only end up adding complexity! Great overview of all the pros and cons. Please more of these :P
Thanks for the kind words Luciano! I'll try to make more videos!!
Nice to see you creating content like this!
Thanks Sergio! I'm still trying to figure out the medium, but I think I'll make more
Amazing content and tips! Thanks for sharing AJ!
Thanks Max! Love the channel!
you are bril man, thanks for sharing this kind of knowledge
Happy to help!
an impressive experience related to cold starts with AWS Lambda It has got me wondering whether GCP Cloud Run offers a similar mechanism
𝗧𝗵𝗲 𝗪𝗮𝗿 𝗶𝗻 𝗨𝗸𝗿𝗮𝗶𝗻𝗲 𝗜𝘀 𝗖𝗵𝗮𝗻𝗴𝗶𝗻𝗴 𝘁𝗵𝗲 𝗪𝗼𝗿𝗹𝗱 The war in Ukraine is unlike any war that’s been. Although it seems local, this war is changing the world. In the end, after all the pain, the parties will establish new relationships, and new relationships will be established around the world. This war is the beginning of a formation of a new world order, where all parties unite against the one common enemy of all of humanity: egoism. It will take time, but everyone involved will realize, and the whole world with them, that they are not fighting against each other, but against an enemy within them. If we let the idea sink in, even a bit, it will make it happen even sooner. The war that began in late February will not end soon. It will take many more months until everyone realizes that war itself, the very concept of it, is evil. In that sense, the war in eastern Europe is correcting all of humanity, transforming our perception and our understanding of good and evil. The casualties, the injured, and the lost property are a terrible price to pay. Nevertheless, global processes always come at a cost. We should not blame others for the cost, and we should not think that there is nothing each of us can do to change the world. It is in the hands of every person to change the world for the better, and to make the atrocities of war, and all atrocities that humans are inflicting on each other, disappear. All we need is to realize that the only enemy lies within us-our self-centered attitude. It incites us against each other, demonizes and vilifies anyone who disagrees with us, tells us that we are the only ones entitled in this world, and thereby sets us off against each other. We are all like that, infected with a pandemic of narcissism. Nevertheless, there is a lot we can do to change the world. First, we must accept that there is a good reason we are so different from each other. Each of us makes a unique contribution to the world that no one else can. If we were all the same, the contributions we receive from others, and on which our lives depend, would be absent, and we would not survive, in the most physical sense of the word. We will realize that our ego is the enemy only when we realize that singularity is the wrong key word for happiness. Today, the key word for happiness is complementarity-mutual satisfaction of each other’s material, social, emotional, and spiritual needs. We are living in a world where we are all dependent on each other. The food we eat, the clothes we wear, and the appliances and gadgets that we use are all made by people we do not know, in places we do not know, and reach us in ways we do not know. But were it not for this chain of myriad unknown individuals, we would not survive, since we cannot provide for our needs by ourselves. The same goes for social ties. All our connections, communications, and interactions with other people are made possible with the help of countless people who serve us without our awareness. But were it not for them, we would not be able to work or socialize. Despite this obvious fact, we behave toward others with as little consideration as possible, and when we are nice or considerate, it is because we have an ulterior, selfish motive. We do not have the prerogative to keep up this behavior. We are destroying the world and destroying ourselves. Back in the 1930s, Baal HaSulam, a great thinker and a great kabbalist, wrote an epic essay titled “Peace in the World.” In it, he writes, “Man is inherently born to lead a social life. Each and every individual in society is like a wheel that is linked to several other wheels placed in a machine.” How odd it is that ninety years ago, before World War II, people already realized that we are all dependent on each other and must behave toward each other with consideration. Just think what we could have avoided had we been more attentive and open-minded. Now, too, we are headed for a catastrophe unless we pay attention and begin to act like one entity, one global society that works like a single, united family. The war will change the world, but I hope we can change ourselves before the war changes us.
Crazy man!
I like the last guys girly voice! You can tell how scared he was!
Wow gila😂👍👍👍
Nicely done!
Badass!
You guys freakin' rock it!
Nice one, AJ!
nice compilation! loved the part of Lauterbrunnen, Switzerland. my home ;D keep going & be blessed
Fantastic.
great
It was sooooo fun!
nice stuff :)
Amazing.
Loved how scenic it looked when the GoPro hit the ground. The timing and position of the parachute is perfect lol
The story is rather funny, and I explain it a bit in another video. But I ended up losing that camera in the grass in Switzerland for almost a month. Eventually the cows ate enough of the grass and another jumper stumbled over it. He posted a picture of me, and I ended up getting it back.
Been watching this over and over. Really like this one AJ.
+Squeezer Andersson haha awesome! I've been watching yours over and over again too, I just can't wait to come back!
God loved Switzerland
This is awesome hope to visit here on one day and do the same. I kinda want to know your story? I mean do you do this daily monthly yearly or like for a living? hahah Saw your video on GoPros channel. Stay Safe ;) and awesome video.
hey man! Glad you liked the video. My story is pretty simple. I started skydiving, then eventually moved on to BASE jumping. Eventually I took a trip to this valley in Switzerland! BASE jumping is a passion of mine, but it doesn't pay the bills. I do have a day job, but I try to jump as often as I can. Usually that means one or two big trips per year, with lots of little outings in between. Thanks for the kind words!
And finishing like this... AWESOME
+Doberman Durden I'm just happy I was able to recover my camera and post the footage!
I like videos starting like that :D
just awesome this compilation!! :) right now it is snowing here in Lauterbrunnen really bad :S
Nothing can destroy a GoPro - except Chuck Norris ;D
Hello! nice video, if you are interested in videos made with GoPro, try to look at my if you like, and maybe subscribe to the channel?