Service Overlay Networks (SONs) create a virtual topology on top of the Internet and provide end-to-end quality of service guarantees without requiring support by the underlying network. The optimization of the resources utilized by an SON is a fundamental issue for an overlay operator owing to the costs involved and the need to satisfy user requirements. Careful decisions are necessary to provide enough capacity to overlay links, to route traffic, to assign users to access nodes and to deploy overlay nodes . In this paper, we propose two mathematical programming models for the user assignment problem, the traffic routing optimization and the dimensioning of the capacity reserved on overlay links in SONs. The first model minimizes the SON installation cost while providing full access to all users. The second model maximizes the SON profit by selecting which users to serve, based on the expected gain, and taking into consideration budget constraints of the SON operator. Moreover, we extend these models to include the optimization of the number and position of overlay nodes. We provide the optimal solutions of the proposed SON design formulations on a set of realistic-size instances and discuss the effect of different parameters on the characteristics of the planned networks. Numerical results show that the proposed approach is able to solve the problem to the optimum even for large-scale networks.