A sampling node in a SDN and a method performed thereby for handling flows through the SDN between client(s) and origin server(s) of a communication network connected to the SDN are provided. The method comprising receiving (110) a fraction of a total amount of traffic flows originating at client(s) served by the SDN, and destined for the origin server(s); identifying (120) which of the received traffic flows that benefit from being routed via a service optimising node, capable of providing value added services, VAS, to the traffic flows, by fulfilling predetermined conditions; and determining (130), for each individual traffic flow, a capacity demand of the flow. The method further comprises selecting (150) which traffic flows that shall be routed via the service optimising node on the basis of their capacity demand considering a capacity of the service optimising node; and informing (160) a flow switch of the SDN about which traffic flows should bypass the service optimising node and which traffic flows that should be routed via the service optimising node.