Optimal dynamic cloud network control