Been looking at various options for function like service to host API type stuff & thought I'd share some findings ramblings.
Focus here is mostly on low usage in the context of free tiers ala cheapskate. API is consumer facing so can't have second long cold starts.
TLDR: GCP wins for my specific usage case (avoid cold starts, full featured execution env). Honourable mention to Cloudflare workers and AWS Lambda for some intriguing aspects.
Please do forgive the fairly low quality stream of thought write-up.
Most familiar with this and has an idle billing tier, so focused on this more than rest.
I've been using python, but will change this since I discovered lang choice matters.
Go vs Python, trivial hello world stuff, gen2 128mb sizing. Execution time looks about the same. The memory utilization on the other hand 12mb Go, 70mb Python. Given that sizing of these functions starts at 128mb...that 70mb for a python hello world is definitely notable.
Then there is the cold start issue. I've had significant issues with this in the past, so the new min instance mechanism to keep them warm seems basically compulsory.
Long story short it costs ~1USD to keep a function warm per function. Of which free tier absorbs about 0.9 functions...so basically you get one free and each subsequent warm one it a dollar.
Gen 2 also has better concurrency support, however there is a major gotcha hidden in the documentation:
For preview, this will only be supported by .NET, Java, Node.js, and Go runtimes, for functions with 1 or more vCPUs.
Note specifically the 1 vcpu...not obvious in LES context, but that's not bottom end - 0.083 is...so 1vcpu is a fairly chunky sizing which basically means ~$8 min a month. No concurrency means two simultaneous request need more than 1 instance...back to cold starts even with 1 min to keep it warm. I suppose you could keep two warm, which given <10m execution time means chances of a cold start are near zero. Even one may be an acceptable risk though. Alternatively one could keep one artificially warm via timer but that's quite janky.
Does provide a strong incentive to pack as much stuff into one omnibus function though, which goes against the conceptual simple connector/glue type thinking that functions originally were.
Free allowance tier looks meh, and chatter suggests cold starts are an unsolved problem. Not seeing anything suggesting this is even worth trying
Technically this solution is vastly superior to the rest. No cold starts, easy integration with KV storage, global distribution.
The major gotcha is the incredibly limited execution environment (basically JS), super short execution time maximums and the pricing model. It doesn't scale up gradually like GCP...once you start hitting limits you're on paid plan ($5).
Very odd...they'll give you ~6 free VMs and 24GB mem forever on an unpaid account. Very generous. Cloud function? Nope...nada...nothing without a credit card. There is a free allowance...but you can't get it without a card. Free allowance looks like the same 400k gb/s everyone else is offering too. meh.
Looks to cover about ~1 function continuous running in free allowance. But the per GB/s pricing outside of that is like 6x GCP. And I don't see mention of a min number of instances so not sure if avoiding cold starts is even possible. Overall doesn't look attractive.
Very confusing pricing. e.g. for consumption model it mentions it bills by vcpu/s but doesn't list the price. If similar to premium model then its crazy expensive. Nope....
Looks cheaper compared to rest on a GB/s basis and billing is 1ms not 100ms like the rest. Also require keeping functions warm so ends up in similar territory to GCP...basically 1 free warm function. Unlike GCP there is no idle price tier though...so ends up being substantially more expensive for subsequent ones if you want to keep a function warm all month (~4.5 USD). For usage cases where cold starts are acceptable AWS looks excellently priced though.