Cluster-based multi-tier systems provide a means for building scalable Internet services. Building adaptive Internet services that are able to apply appropriate system sizing and configuration is a challenging objective for nowadays system administrators. This paper addresses two issues for building adaptive Internet services: (i) the control of service cost, performance and availability, three antagonist and primary aspects of Internet services, and (ii) an adaptive control of Internet services that does not shift the complexity of system administration from the Internet service to its controller. This paper presents the design and implementation of MoKa - a middleware for controling performance and availability of cluster-based multi-tier systems. The contribution of the paper is multifold. First, we improve an analytic model to predict the performance, availability and cost of cluster-based multi-tier applications. Second, we define a utility function and use it to build a capaci...