Rust + Serverless = LOVE - Maxime David - Rust Linz, July 2023
ฝัง
- เผยแพร่เมื่อ 30 ก.ย. 2024
- Discover the unbeatable synergy of Rust with serverless components such as AWS Lambda or GCP Cloud Run. Why Rust is the perfect match for serverless architecture? Uncover the unique features of Rust that make it the top choice for building ultra-efficient and robust serverless apps. Don't miss this chance to revolutionize your cloud development game and enjoy a 100% serverless pizza tracker demo! 🍕
--
Maxime David is a life-long open source aficionado and Senior Software Engineer advancing serverless topics at Datadog. He’s keen on code profiling, and believes that performance in software matters. When he’s not optimizing software, he likes to try every banana bread he can find.
Rust + Serverless = Love - Maxime David - Rust
simplifying:
Serverless = Love - Maxime David
solve for Maxime David:
Maxime David = Love - Serverless
or Maxime David + Serverless = Love
ahahah brillant demonstration!
I believe you've made an error. To simplify, you need to add Rust to both sides. Thus, the simplified equation is 2(Rust) + Serverless = Love - Maxime David
Note that there's a coefficient of two in front of Rust.
Thanks for posting the replay! Let me know if you have any questions!
How is the Websocket connection kept alive when using serverless?
@@moy2010 It's handled by AWS and they are alive for like 10-15 mins usually. I've experienced that it got closed after this time without warning and so i reinitiate the websocket connection every 10 minutes and drop the old one. using a TTL on the dynamodb table which cleanes dead connections.
Is the code available in a GitHub repo for the Pizza tracker from the video?
Thanks for the presentation!
You should consider moving some of the code from the handler function to the main function, e.g. reading env vars, DDB client initialisation etc. Should reduce both cold starts and warm starts.
wow, i had no idea that this would play a role?
Very informative.
Thanks!
In `func()` we seem to be creating a `DynamoDbClient` object each time `func()` is called. Am I wrong?
that's correct, it could definitely be moved outside of the handler
Thanks for all those valuable insights about Rust in a serverless environment ✌️
Thanks! Glad you liked it!
Lambda restricts to only 1 request at a time, which might be good for CPU-intensive apps but if your source of events is coming from the client, non-blocking Rust app would be able to handle thousands of request per second if deployed to Fargate so it's kinda less optimal.
Github link?