
Ask HN: How are you using Serverless architecture in production? - kcoleman731
I&#x27;ve been hearing a ton about&quot;serverless&quot; software recently and am evaluating AWS Lambda for an upcoming project. I&#x27;d be curious to know how the Hacker News community has actually been leveraging serverless architecture in production?<p>Which use cases have worked well for people? Which have not?
======
tedmiston
AWS Lambda is really cool, but there are a few quirks to keep in mind that
make it not a general replacement for something like a box running nginx +
uWSGI, etc.

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/](http://pyohio.org/schedule/presentation/246/)

Video -
[https://www.youtube.com/watch?v=ZoMhFsH9k8Q](https://www.youtube.com/watch?v=ZoMhFsH9k8Q)

~~~
kcoleman731
Awesome, thank you very much for sharing these. I'll have a look.

------
schappim
Yes. I have a high volume ecommerce site that sells Raspberry Pis in
Australia[1] which is static and built using middleman[2]. The files sit on S3
+ Cloudfront and are deployed using S3_website[3].

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](http://raspberry.piaustralia.com.au)

[2] [https://middlemanapp.com/](https://middlemanapp.com/)

[3]
[https://github.com/laurilehmijoki/s3_website](https://github.com/laurilehmijoki/s3_website)

[4] [https://help.shopify.com/themes/customization/cart/use-
perma...](https://help.shopify.com/themes/customization/cart/use-permalinks-
to-preload-cart)

------
tantalor
I'm a big fan of Google App Engine; it has support for many languages now and
powers some huge apps like Pokemon Go.

[https://www.g2crowd.com/blog/platform-as-a-service-
paas/plat...](https://www.g2crowd.com/blog/platform-as-a-service-
paas/platform-as-a-service-pokemon-go/)

~~~
schappim
>> and powers some huge apps like Pokemon Go

Perhaps not the best ringing endorsement, given their downtime :)

------
imauld
We use it for various small tightly contained tasks in response to events
(Kinesis events, S3 writes, etc), similar to how you might use Celery tasks to
do something where either don't care about the result or the result might take
to long to compute for you wait.

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.

------
mrits
I've spent the past two weeks working on architecture proposal around this. At
a very high level my conclusions were basically:

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.

