In SDN stateful data planes, switches can execute algorithms to process traffic based on local states. This approach permits to offload decisions from the controller to the switches, thus to reduce the latency to react to network events. We consider distributed network applications that process traffic at each switch based on local replicas of network-wide states. Replicating a state across multiple switches poses many challenges, because the number of state replicas and their placement affects both the data traffic and the synchronization traffic among the replicas. In our work, we formulate the optimal placement problem for replicated states, taking into account the data traffic routing, to ensure that the network applications affect the proper traffic flows, and the synchronization traffic between replicas, to ensure state coherence. Due to the high complexity required to find the optimal solution, we propose an approximated algorithm able to scale to large network instances. We show numerically that this algorithm, despite its simplicity, approximates quite well the optimal solution. We also show the beneficial effects of replicating the states with respect to the singlereplica scenario, so far considered in the literature. Finally, we provide an asymptotic analysis to find the optimal number of replicas. Software Defined Networking (SDN), Stateful data planes, State replication. switches can take local decisions without relying on the intervention of an SDN controller [5] . This fact has many main beneficial effects. First, it greatly improves the reactivity of network applications by reducing the communication and latency overhead due to the interaction with the controller. Second, it reduces the computational burden of the controller to sustain the correct network behavior [6] . Finally, the availability of state variables enables new fine-grained networking applications [7] , as decisions can now be taken on a per-packet basis contrary to the per-flow basis of canonical SDN. The availability of local state variables (denoted simply as "states" in the following) and the capability to run local programs (i.e., finite state machines) based on such states open a new perspective, since now distributed algorithms can be devised to run in the switches across the network. This allows to extend the scalability of many network applications, thanks to its distributed nature. In particular, differently from previous works, we focus on the specific scenario in which the network application runs locally in stateful switches based on some non-local states. Indeed, for applications implementing network-wide policies, the value of a state may be "global" across multiple switches and each switch holds only a local replica of the state. Recent works, as [8], have shown the practical feasibility of this approach by leveraging available programmable data planes, such as P4 [3] and Open Packet Processor (OPP) [4]. Whenever a given state is replicated across multiple switches, two fundamental and coupled questions must be addressed: How many replicas are needed? In which switches to place such replicas? The optimal answer must consider many issues. First, all the traffic flows must traverse at least one switch that hold a state affecting (or affected by) the flow. However, routing a flow not along its shortest path increases the data traffic on the network, impairing the overall network performance. Thus, from the point of view of the data traffic, it would be convenient to increase the number of replicas until at least one replica is present along the shortest path of each flow. At the same time, adopting replicas comes at the cost of keeping the replicas synchronized. This requires the interaction between the switches holding the replicas and thus introduces a synchronization traffic, which increases with the number of replicas and consequently affects the overall offered load on the network, impairing the network performance. Thus, from the point of view of the synchronization traffic, it would be convenient to reduce as much as possible the number of replicas. In summary, the optimal selection of the number of replicas and their location depends on the tradeoff between data traffic and synchronization traffic.
The work in REF can be used as a building block for LOADER (i.e., the optimization engine), which provides the programming framework and the implementation for replicated states.
Optimal state replication in stateful data planes
ArXiv
ArXiv
Computer Science