Ask HN: How are you using Serverless architecture in production?
I've been hearing a ton about"serverless" software recently and am evaluating AWS Lambda for an upcoming project. I'd be curious to know how the Hacker News community has actually been leveraging serverless architecture in production?
Which use cases have worked well for people? Which have not?
7 comments
[ 4.1 ms ] story [ 29.4 ms ] threadhttps://www.g2crowd.com/blog/platform-as-a-service-paas/plat...
Perhaps not the best ringing endorsement, given their downtime :)
There was a nice 45-minute talk given at PyOhio this year by Matt Land that covers most of the tradeoffs around running Lambda in prod.
AWS Lambda: From Curiosity to Production
Abstract - http://pyohio.org/schedule/presentation/246/
Video - https://www.youtube.com/watch?v=ZoMhFsH9k8Q
As a completely made up arbitrary example say you send two types of emails to your users, a newsletter and personal notifications. You send the notifications yourself but have a third party service for the newsletter. When a user opts out of all emails you can make the required changes on your end but calling out to the other service might take longer than you are are willing to make a user wait.
So instead you write something to S3 or Kinesis or some other stream that Lambda can access that takes the user ID and informs your email provider to no longer send emails to this address.
The contact page is powered by AWS Lambda.
Some old school jQuery keeps track of the commerce cart and forms "Cart Links"[4], that send the user to the checkout of a Shopify Store.
[1] http://raspberry.piaustralia.com.au
[2] https://middlemanapp.com/
[3] https://github.com/laurilehmijoki/s3_website
[4] https://help.shopify.com/themes/customization/cart/use-perma...
API Gateway could be very useful but is extremely overpriced. Lambda is a bit more reasonable but not worth the trouble for me.
Both of those services have easy alternatives such as Auto Scale rules, EC2, and ELB.
Kinesis is really nice. And for our use case, isn't very expensive. If people used it for things like a distributed task queue I could see how things could get out of hand. We will use it for more of an ingress data buffer.
I'm also using the KCL which uses dynamodb to handle some distributed state issues. A bit like ZooKeeper. This will allow you to handle some coordination between your consumers and meet the demands of your delivery requirements.