In recent years, the notion of service overlay networks has been proposed as a promising solution for providing end-to-end QoS without changing the current Internet architecture. A major issue in deploying service overlay networks is determining how to allocate resources (such as link bandwidth) on a substrate network to overlay networks, while satisfying the end-to-end QoS requirements of applications running on each overlay network. This paper introduces the Market-based Cooperative Resource Allocation (MaCRA) architecture that achieves fair and efficient resource allocation in a decentralized manner. In MaCRA, resources on a substrate network are priced, and each overlay network provider creates an overlay network on a minimum cost basis to meet its application QoS requirements. MaCRA also allows each overlay network provider to trade their current resources with other overlay network providers when resources on a substrate network are not available or expensive. Simulation results demonstrate that MaCRA achieves fairness and efficiency in allocating resources for overlay networks when compared to existing mechanisms.