234 points by kevlarsaurus 5 months ago flag hide 19 comments
juditholsen 5 months ago next
Fantastic write-up! I've been curious about using Rust with AWS Lambda and this is just the encouragement I needed. Well done!
lambdaguru 5 months ago next
@JudithOlsen I'm glad you enjoyed the post! Rust and AWS Lambda are a great combo, I'm eager to see what you'll build. Let us know how it goes!
syntaxking 5 months ago prev next
Never considered using GraphQL for a serverless API before now! I'll surely try this out and see how it goes. Thumbs up!
apiwiz 5 months ago next
@SyntaxKing Yeah, I was surprised by the ease of integration as well! Feels like a perfect pair for building event-driven and instant update APIs.
binarybeast 5 months ago prev next
I've been stuck with a Node/Express GraphQL API and this post is the swift kick I needed. Time to get my hands dirty and learn some Rust.
serverlessjoy 5 months ago next
@BinaryBeast Rust is an excellent choice, and AWS Lambda even provides a nice dev environment. Good luck on your journey!
awsmate 5 months ago prev next
@BinaryBeast Check this tutorial for an ideal introduction: (link to excellent Rust AWS Lambda guide) Good luck and have fun!
codetinker 5 months ago prev next
Some concerns about cold starts and resource management during heavy loads. Does anyone have good strategies for mitigating these issues?
optimizegrid 5 months ago next
@CodeTinker For cold starts, you can make use of AWS's provisioned concurrency: (link to AWS provisioned concurrency documentation) That's helped my team during high loads.
cloudyfriend 5 months ago prev next
@CodeTinker You can also implement a ping service to keep the Lambda warm. We tried that with lots of success. Basically, send heartbeat requests periodically to the API. A small burden to pay for the performance boost. :)
containerpilot 5 months ago prev next
Odd question: Is it possible to run this on a Kubernetes cluster with a custom scheduler? I'd love to try this on-prem with some of our legacy systems.
clustermaster 5 months ago next
@ContainerPilot Yes! Check out OpenFaaS (link to OpenFaaS documentation) and Kubeless (link to Kubeless documentation), both are great ways to run serverless tasks on Kubernetes, and they'll integrate well with your existing infrastructure.
queencode 5 months ago prev next
Reaching out to request a part 2, detailing how database interactions were implemented in this setup! Thanks for an informative article!
apiwiz 5 months ago next
@QueenCode Great idea! We'll get the second post ready with a focus on database integration. Stay tuned! :)
seniorsparrow 5 months ago prev next
This is so different from my Python/Flask GraphQL setup. Rust and GraphQL seem like a great fit together. Gotta dig deeper into the AWS Lambda side.
rustyrose 5 months ago next
@SeniorSparrow Absolutely! Check out Async-GraphQL written in Rust for similar syntax to Python Flask: (link to Async-GraphQL crate documentation) That should make the transition smoother for you.
netnerd 5 months ago prev next
One must admit, the API performance tests are impressive. Any idea how the numbers would be affected by moving to an alternative cloud provider?
costoptimizer 5 months ago next
@NetNerd You could expect similar performance from the big-three providers, but there'll be slight discrepancies depending on specific implementations of AWS, GCP, Azure, and other vendors.
serverlesstransporter 5 months ago prev next
@NetNerd At our company, we observed a 5-10% performance difference moving from AWS to GCP and Azure. IMO, the choice depends more on the ecosystem that better suits your team and overall architecture.