Recent studies have revealed that the adoption of application-level routing that chooses an end-to-end traffic route relaying other end-hosts can improve certain user-perceived performance factors. However, selfish route selection performed by each application user can lead to a decrease in the route performance due to route overlaps, as well as an increase in the inter-ISP transit cost as a result of utilizing more transit links than in the case of IP routing. In the present paper, we strictly define an optimization problem for selecting application-level traffic routes with the aim to improve end-to-end network performance and reduce transit cost. We then propose centralized and distributed heuristic algorithms based on simulated annealing in order to obtain near-optimal solutions to the problem. We evaluate the performance of the proposed method by assuming that the PlanetLab nodes utilize application-level traffic routing. We show that application-level traffic routing with the proposed algorithms can result in a considerable improvement of network performance. In particular, in the case of using the available bandwidth as the routing metric, the end-to-end network performance can be improved by 87% on average.