Implementation and evaluation of an inline network measurement algorithm and its application to TCP-based service