Decentralized dynamic routing as a Markov chain optimization problem