  Serverless computing platforms currently rely on basic pricing schemes that
are static and do not reflect customer feedback. This leads to significant
inefficiencies from a total utility perspective. As one of the fastest-growing
cloud services, serverless computing provides an opportunity to better serve
both users and providers through the incorporation of market-based strategies
for pricing and resource allocation. With the help of utility functions to
model the delay-sensitivity of customers, we propose a novel scheduler to
allocate resources for serverless computing. The resulting resource allocation
scheme is optimal in the sense that it maximizes the aggregate utility of all
users across the system, thus maximizing social welfare. Our approach gives
rise to a natural dynamic pricing scheme that is obtained by solving an
optimization problem in its dual form. We further develop feedback mechanisms
that allow the cloud provider to converge to optimal resource allocation, even
when the users' utilities are private and unknown to the service provider.
Simulations show that our approach can track market demand and achieve
significantly higher social welfare (or, equivalently, cost savings for
customers) compared to existing schemes.
