  We study online resource allocation in a cloud computing platform, through a
posted pricing mechanism: The cloud provider publishes a unit price for each
resource type, which may vary over time; upon arrival at the cloud system, a
cloud user either takes the current prices, renting resources to execute its
job, or refuses the prices without running its job there. We design pricing
functions based on the current resource utilization ratios, in a wide array of
demand-supply relationships and resource occupation durations, and prove
worst-case competitive ratios of the pricing functions in terms of social
welfare. In the basic case of a single-type, non-recycled resource (i.e.,
allocated resources are not later released for reuse), we prove that our
pricing function design is optimal, in that any other pricing function can only
lead to a worse competitive ratio. Insights obtained from the basic cases are
then used to generalize the pricing functions to more realistic cloud systems
with multiple types of resources, where a job occupies allocated resources for
a number of time slots till completion, upon which time the resources are
returned back to the cloud resource pool.
