To adapt to continuously changing workloads in networks, components of the running network services may need to be replicated (scaling the network service) and allocated to physical resources (placement) dynamically, also necessitating dynamic re-routing of flows between service components. In this paper, we propose JASPER, a fully automated approach to jointly optimizing scaling, placement, and routing for complex network services, consisting of multiple (virtualized) components. JASPER handles multiple network services that share the same substrate network; services can be dynamically added or removed and dynamic workload changes are handled. Our approach lets service designers specify their services on a high level of abstraction using service templates. From the service templates and a description of the substrate network, JASPER automatically makes scaling, placement and routing decisions, enabling quick reaction to changes. We formalize the problem, analyze its complexity, and develop two algorithms to solve it. Extensive empirical results show the applicability and effectiveness of the proposed approach. This work has been submitted to the IEEE for possible publication. Copyright may be transferred without notice, after which this version may no longer be accessible.(iii) the network flows between the service components can be re-routed through different, more suitable paths.Given this large number of degrees of freedom for finding the best adaptation, deciding scaling, placement, and routing independently can result in sub-optimal decisions for the network and the running services. Consider a service platform provider hosting a dynamically changing set of network services, where each network service serves dynamically changing user groups that produce dynamically changing data rates. Trade-offs among the conflicting goals of network services and platform operators can be highly non-trivial, for example:• Placing a compute-intensive service component on a node with limited resources near the source of requests (e.g., the location of users, content servers, etc.) minimizes latency but placing it on a more powerful node further away in the network minimizes processing time. • Letting a single instance of a data-processing component serve multiple sources minimizes compute resource consumption but using dedicated instances near the sources minimizes network load. • Changing the current configuration to a better one will hopefully pay off in the long run but keeping the current configuration avoids reconfiguration costs. • Fulfilling the resource requirements of one service versus the requirements of another service. To deal with these challenges, we propose JASPER, a comprehensive approach for the Joint optimizAtion of Scaling, PlacEment, and Routing of virtual network services. In JASPER, each network service is described by a service template, containing information about the components of the network service, the interconnections between the components, and the resource requirements of the components. Both...