More generally, our algorithm consists of two main steps. First, we
compute the distances
for the original graph
and
all transformations
using an all-pairs shortest
path algorithm. (For simple graph transformations, such as all
single-link failures, an incremental Dijkstra algorithm can reduce the
overhead of computing the
instances of the all-pairs
shortest paths.) Then, we generate the constraints for each
pair as presented in Figure 4.
Step
runs once (on the original graph) and step
runs
times (on each graph transformation), generating a constraint for
each alternative to the desired egress point for that configuration.
As a result, the algorithm produces
constraints for each pair
. The size of
is limited
by the number of edge nodes that have best BGP routes for a prefix; in
practice, the size is usually one, two, or three, or at most ten.
Fortunately, any prefixes that have the same egress set produce the
same constraints, and the same values of
and
. The
number of unique egress sets is typically orders of magnitude less
than the number of prefixes, which substantially reduces the running
time of the algorithm. In order to reduce the complexity and number
of configurable parameters, we group all routers in the same PoP into
a single node; these routers typically make the same BGP routing
decisions anyway, since they essentially act as one larger router.
Ultimately, the running time of the algorithm is dominated by the
number of topology changes in
.