-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pricing of cloud functions compared to preemptible machines #52
Comments
This is a good topic to explore, and I was planning to write a blog post about it. Using cloud functions vs preemptible instances has different trade-offs and price is one of them. In general I've found that it's difficult to determine the performance/cost of a given workload without experiments, so I'm reluctant to give advice on preemptible instances until I've had chance to experiment. That said, I can say with confidence about cloud functions:
I do plan on exploring preemptible instances to see if they could be a good fit. One way to use them today is to simply start an instance and run a workload using the The nature of the workload also has an impact on the choice. If you're doing a workload that requires long run times (>~15min), then cloud functions won't work. Workloads that are run continuously and has fewer load spikes, can be sized once and run on an appropriate instance. However, if the workload is a "race to completion" and only needs to be run ad-hoc, or has spiky load, or needs to finish as soon as possible, using faast.js with AWS (specifically) can provide much more flexibility and lower cost than you think (i.e. no need to overprovision a large instance and keep it running in case a workload comes in at any moment, faster startup and scaling, and higher core limits and overall i/o bandwidth). AWS Batch and similar services can also avoid the limits of single instances and the benefits of pay-for-usage and scalability. I don't have enough experience with them to have an opinion on performance or cost at this point. But they come with more operational overhead and are (in my opinion) just plain hard to use. But I'll have to give them a spin; they might even become a target backend for faast.js if there's interest. If you do run experiments on preemptible instances vs. AWS Lambda in the optimal region, I'd welcome any data you could provide. |
Many, many great points! Thank you for your thoughts. I'll definitely report back if I end up with any useful data. Cloud functions seem to "have their cake and eat it too" in many respects - perhaps except for pricing, but like you said, you're paying to not have to deal with a bunch of project-specific code to handle whatever inherent bottle-necks you might run up against when your cores are competing for memory, bandwidth, disk, etc. I'm very new to this whole area, but if I end up producing any meaningful data in my journeys I'll definitly report back! |
I've just started researching options for a large scale batch computing job and although pricing isn't a huge worry (since it's a one-off job), it is something that interests me in case I end up building a deployment script/framework that can be used on future projects:
So the cloud function approach appears to be ~6x the price of the preemptible machine approach? And if you take into account clock speed then it's somewhere near 12x the price? I also haven't taken into account the invocation pricing of the cloud functions, but I'm assuming that would be small. The preemptible machine approach also has the advantage of being able to run code for longer than 10 or 15 mins, which is very handy for me - it saves me splitting up files that need to be processed into smaller, digestible-in-10-minutes chunks and coding all the logic to handle merging and stuff.
@BrandiATMuhkuh, who you were talking to on the hacker news thread seems to have switched to many-core machine(s) after trying the cloud function approach, and I wonder if pricing was a consideration there?
If I've not made any mistakes or incorrect assumptions, then is it within the scope of faast.js to consider preemptible machines? Since you've implemented a
local
provider, I'm assuming that you've done most of the leg-work required to be able to deploy it to an actual machine, rather than a cloud function.The text was updated successfully, but these errors were encountered: