The disclosure relates to a computer-implemented method for controlling on-demand service provisioning in a network, wherein the network comprises resources for providing a service. In the method, a service request is intercepted. At least one network function, indicated as a first network function, required for the service associated with the service request is determined. Then, the first network function is instantiated on a resource in the network for executing the service in the network.