With increasing number of alternative services which has similar functionality characteristics deployed over the cloud, QoS (Quality of Service) plays a more and more important role in deciding which component service should be selected. Although a lot of service composition approaches related to QoS have been proposed, most of existing method focused only on the global constraints. In this paper, we propose a QoS-aware service composition method named OR (optimal road) to address the service composition problem with global and local constraints. The simulation data indicate the efficiency and accuracy of the proposed approaches.