new traffic  middleware api