Generic traffic splitting algorithm