Optimizing Response Time For Distributed Applications In Public Clouds