FaaS vs. CaaS
One USP of public cloud is “pay only for what you use”. It works quite well for storage, IOPS, and other API oriented services. Say, if you use AWS S3 storage, you pay for the amount of data stored and the number of put and get API calls. But, when it comes to compute services on a public cloud, you pay for the allocated capacity independent of whether you use that capacity. For example, if you bring up a virtual machine with 2 cores and use only 1 core, you still pay for 2 cores. For batch jobs, it is comparatively easy to calculate the required compute resources and use them fully. On the other hand, if you are serving API requests, the system load depends on the API calls served in parallel. Since the API load can be quite spiky, you need compute resources that can quickly scale out to ensure that you can meet the API response SLA and also ensure that allocated compute is used fully. In other words, quicker boot up leads to lower cost.