  Emerging reconfigurable optical communication technologies allow to enhance
datacenter topologies with demand-aware links optimized towards traffic
patterns. This paper studies the algorithmic problem of jointly optimizing
topology and routing in such demand-aware networks to minimize congestion,
along two dimensions: (1) splittable or unsplittable flows, and (2) whether
routing is segregated, i.e., whether routes can or cannot combine both
demand-aware and demand-oblivious (static) links.
  For splittable and segregated routing, we show that the problem is generally
$2$-approximable, but APX-hard even for uniform demands induced by a bipartite
demand graph. For unsplittable and segregated routing, we establish upper and
lower bounds of $O\left(\log m/ \log\log m \right)$ and $\Omega\left(\log m/
\log\log m \right)$, respectively, for polynomial-time approximation
algorithms, where $m$ is the number of static links. We further reveal that
under un-/splittable and non-segregated routing, even for demands of a single
source (resp., destination), the problem cannot be approximated better than
$\Omega\left(\frac{c_{\max}}{c_{\min}} \right)$ unless P=NP, where $c_{\max}$
(resp., $c_{\min}$) denotes the maximum (resp., minimum) capacity. It remains
NP-hard for uniform capacities, but is tractable for a single commodity and
uniform capacities.
  Our trace-driven simulations show a significant reduction in network
congestion compared to existing solutions.
