News for hackers. Stuff that matters.
Re:Use AWS Lambda to self-host the comments for your blog by jimpick on Friday May 06, 2016 @11:51AM (#11644758)
Cool. It's great to see my project on Hacker News!

Feel free to ask me any questions here, or using the comment system on the blog post. :-)

Re:Use AWS Lambda to self-host the comments for your blog by ShakataGaNai on Friday May 06, 2016 @12:59PM (#11645203)
Love the idea. For those who aren't as Lambda savvy you might want to provide some "real world" information on pricing. Ex: This code takes roughly 500ms to run, which means you should expect to pay $0.10 per 96,000 comments on your blog.

I know it's stupidly small costs (Lambda is wonderful for that), but some people still don't understand how to translate the pricing structure to "the real world".

Re:Use AWS Lambda to self-host the comments for your blog by cddotdotslash on Friday May 06, 2016 @02:27PM (#11645740)
For anyone looking to calculate Lambda pricing, I made a calculator[1] when developing a previous project.

[1] https://s3.amazonaws.com/lambda-tools/pricing-calculator.htm...

Re:Use AWS Lambda to self-host the comments for your blog by jimpick on Friday May 06, 2016 @01:03PM (#11645228)
Looking at the CloudWatch Logs, each comment seems to take approximately (Billed Duration): 400ms for the initial request, and 800-1000ms for the worker to concatenate the request into the published JSON.

It's running in the minimum size of RAM: 128MB

Re:Use AWS Lambda to self-host the comments for your blog by prodigal_erik on Friday May 06, 2016 @07:02PM (#11647327)
This is making me wonder whether we should be paying for GC or just having Lambda abandon workers whose heaps are full and spin up more.
Re:Use AWS Lambda to self-host the comments for your blog by pmontra on Saturday May 07, 2016 @08:07AM (#11649274)
Lambda doesn't destroy the instance at the end of the response. It keeps it running just in case other requests arrive. If that happens you might want GC or a worker eventually runs out of memory.

What could happen with Lambda and similar services is that costs will take back under the spotlight "old" languages that run with little memory and little CPU cicles. I'm even thinking about C. I'm not into Go, but that looks like another candidate.

Scenarios: those ubiquitous web services running on a single VM because it's more than enough. The customer has to pay for it all the time and could save money if the app can run on Lambda. Enough to pay more in developer time?

Re:Use AWS Lambda to self-host the comments for your blog by jimpick on Saturday May 07, 2016 @12:51PM (#11650287)
What surprised me with Lambda is that it 'freezes' the VM your code is running in, and 'unfreezes' it when more requests come in. Very clever - they can store a lot of frozen VMs on an SSD. It surprised me when I discovered that a cache I had written in my code was already populated!

I think most code running on lambda is not going to be CPU bound. In lambda-comments case it's mostly going to be idling as it waits for TCP/IP traffic to/from Akismet, S3, DynamoDB, Slack notification webhooks, etc.

Re:Use AWS Lambda to self-host the comments for your blog by mrmagooey on Friday May 06, 2016 @09:07PM (#11647837)
I wouldn't have thought the GC would be expensive enough to warrant turning it off, interesting thought though.