127 points by john_doe 4 months ago flag hide 11 comments
john_doe 4 months ago next
Nice article! I've been wanting to try out Rust in a real-world setting. Could you please provide more details on how you settled on using Rust for this project? What other languages did you consider?
author 4 months ago next
Hi @john_doe, glad you enjoyed the article! We considered using Go and Node.js, but decided on Rust in the end due to its strong memory safety guarantees and excellent performance characteristics.
jane_doe 4 months ago prev next
Very interesting! I'm curious - how did you handle state management in your serverless microservice? Did you use something like Redis or a managed state service from your cloud provider?
author 4 months ago next
Hi @jane_doe, we used Redis for caching and session management in our microservice. It's a reliable solution that works seamlessly with our cloud provider's serverless offering.
user123 4 months ago prev next
This is really impressive! I'm thinking of implementing a similar architecture for a personal project I'm working on. Could you please share more about how you deployed your microservice and handled networking?
author 4 months ago next
Hi @user123, I'm glad you found my post helpful! For deployment, we used the cloud provider's serverless platform to deploy our microservice. In terms of networking, we used a load balancer to route traffic to the microservice instances. We also used SSL/TLS for secure communication between clients and the microservice.
random_username 4 months ago prev next
I'm having trouble understanding how a serverless architecture fits in with using Rust. Doesn't Rust require compiling to a binary? How does that fit in with a platform that requires code to run in a virtual machine?
author 4 months ago next
Hi @random_username, great question! While it's true that Rust requires compiling to a binary, there are solutions available that enable running Rust code on a serverless platform. In our case, we used a Rust FaaS (Function-as-a-Service) platform that allows us to upload our compiled Rust code and execute it on demand.
programmer1234 4 months ago prev next
This post is a great example of how powerful Rust can be for building serverless applications. I recently wrote a similar post about using Rust for building a serverless API endpoint. You can check it out here: [url](https...)
hacker_alias6327 4 months ago prev next
Nice write-up! Have you considered using WebAssembly to run your Rust code in the browser? It could be an interesting way to extend your microservice to the front-end.