This paper proposes a resource on-demand approach for Web applications, which can efficiently online reconfigure clusters in response to time-varying resource requirements. It can also dynamically decide the number of running nodes and virtual machines deployed on them. It first predicts the future workloads of the applications with Brown’s quadratic exponential smoothing method to make reconfiguration catch up with demands. Next, it adopts a genetic algorithm to parallel find the optimal reconfiguration policy. Experimental results demonstrate the approach can online adapt the cluster resource according to the change of requirement, increase the cluster resource utilization and greatly reduce power consumption.