This paper introduces a transparent self-configuring architecture for automatic scaling with temperature awareness in the database tier of a dynamic content web server. We use a unified approach to achieving the joint objectives of performance, efficient resource usage and avoiding temperature hot-spots in a replicated database cluster. The key novelty in our approach is a lightweight on-line learning method for fast adaptations to bottleneck situations. Our approach is based on deriving a lightweight performance model of the replicated database cluster on the fly. The system trains its own model based on perceived correlations between various system and application metrics and the query latency for the application. The model adjusts itself dynamically to changes in the application workload mix. We use our performance model for query latency prediction and determining the number of database replicas necessary to meet the incoming load. We adapt by adding the necessary replicas, pr...