The application placement problem (APP) arises in clusters of servers that are used for hosting large, distributed applications such as Internet services. Such clusters are referred to as hosting platforms. Hosting platforms imply a business relationship between the platform provider and the application providers: the latter pay the former for the resources on the platform. In return, the platform provider provides guarantees on resource availability to the applications. This implies that a platform should host only applications for which it has sufficient resources. The objective of the APP is to maximize the number of applications that can be hosted on the platform while satisfying their resource requirements. We show that the APP is NP-hard. Further, we show that even restricted versions of the APP may not admit polynomial-time approximation schemes. Finally, we present algorithms for the online version of the APP.