4 ms·
Lambda is great for infrequent, high CPU tasks such as batch processing. It isn't ideal for high frequency low CPU tasks like serving web requests. You'll pay a
by debaserab2 7y ago
Lambda is great for infrequent, high CPU tasks such as batch processing. It isn't ideal for high frequency low CPU tasks like serving web requests. You'll pay a large percentage more doing it this way. Whether that extra expense is relevant to your business depends very much on your scale (or if you're sitting on a boatload of VC cash, I guess).
- diminoten 7y agoHow do you know what CPU my HTTP requests need?!
- debaserab2 7y agoIf your HTTP requests are high CPU and your doing standard crud type actions, there's something wrong with your codebase. High CPU tasks should be offloaded from the HTTP request into a queue.
- diminoten 7y agoWho said I was doing standard CRUD, and it seems like now you're defining HTTP requests as low-CPU activities just to make Lambda not fit explicitly. Nothing wrong with doing high-CPU activity in a request/response cycle if it's consistent and timely.
- debaserab2 7y agoSounds like in your case lambda might be a good fit? I'm not really sure because you're not really explaining your use case. For the vast majority of crud based web apps that I've seen or worked on in the last decade, lambda would not have been a good fit. There's a lot of people drinking the serverless koolaid right now and applying it to scenarios that don't fit it well.
- diminoten 7y agoJust sounds like you're drinking the same koolaid, just the opposite flavor. Have you actually built a lambda backed web service? Guessing no, or you'd know better than to complain about price. Plenty of better arguments to be had than the one lambda actually does decently on...
- debaserab2 7y agoYes, I have written lambda functions. In our case it was very cost effective because it was a batch processing job that was relatively infrequently accessed. I'm not drinking any kool-aid, I've just broken down the math to see what it would actually cost. You can too if you know what your traffic looks like. https://blog.binaris.com/lambda-pricing-pitfalls/ https://blog.binaris.com/lambda-pricing-pitfalls/
- diminoten 7y ago"Would" is not a phrase you'd use if you've actually written lambda functions the way we're talking about. I have. It's pennies, literal pennies. None of those pitfalls actually end up adding up to more than pennies, everything there is entirely theoretical and does not actualize with substantial consequence, in my experience.
- deleted 7y ago[deleted]