# A Vision for Runtime Programmable Networks

* How important high velocity is for improving the manageability and functionality of network&#x20;
* ![](/files/uNDCJ2rQKoadecOvNTGX)
* SOTA in network programming&#x20;
  * With P4 and other programmable network frameworks, operators compile and reflash the data plane w/ new program&#x20;
    * Much much faster than buying new hardware (make changes much quicker)&#x20;
  * However, reflashing can cause downtime and packet loss&#x20;
    * Want high up-time&#x20;
  * Physical resources are often scarce&#x20;
  * To avoid downtime, changes must be infrequent and operator driven&#x20;
* Benefits of velocity&#x20;
  * Frequent upgrades to the data path&#x20;
  * 90% incidents happen during management operations&#x20;
  * Network in production use are not static&#x20;
    * New needs inevitably arise! (e.g., security responses)&#x20;
  * Changes need to be coordinated across switches, NICs, servers&#x20;
    * Applied to only part of the traffic at a time&#x20;
* FlexNet: live changes in seconds&#x20;
  * Runtime network (re)programming end-to-end
  * No downtime, zero packet loss, consistency guarantees
  * Users can inject customizations to the network&#x20;
* **Why FlexNet?**&#x20;
  * Ex: real-time security defense&#x20;
    * Network devices swap defenses&#x20;
    * Hot patching zero-day attacks in the network
    * Dynamic scaling based on attack patterns&#x20;
  * Just-in-time network specialization&#x20;
    * Common mode: basic network logic, low footprint&#x20;
    * JIT specialization based on workloads and applications&#x20;
  * Tenant-specific extensions&#x20;
    * Tenants directly customize network logic
  * Incremental infrastructure upgrades
    * Coordinated changes at the NIC, switch, and the host
    * E.x. deploy new CC protocols for a slice (for a particular group of cloud tenants)
* **Possible? Why now?**
  * Individual targets are becoming runtime programmable&#x20;
    * P4 and NPL programmable switch ASICs&#x20;
    * SoC and FPGA SmartNICs
      * Runtime programmability --> partial reconfigurations &#x20;
    * Host kernel stacks&#x20;
      * Host-kernel: runtime loading of eBPF programs, kernel loading be dynamically configurable&#x20;
  * Ex: Runtime programmable switches (NSDI '22)
    * Add, remove, and modify match / action tables
    * Change packet header parsers&#x20;
    * Reconfigure control flow&#x20;
* Runtime programmable networks&#x20;

![](/files/k6iY5ZdD4FyN7pjbqsGt)

* Need a way to program the entire network, and need new abstraction to map packet processing to individual components of this network --> **whole network programming**&#x20;
* **Runtime reconfigurability**, with incremental changes, minimally destructive to each of these individual components&#x20;
* Control plane, **real-time network control**: manage the network as apps move from one place to another place&#x20;

Overall, FlexNet raises new challenges across the stack&#x20;

* FlexNet supports runtime deployment, migration, and scale-in, scale-out of applications&#x20;
* **New abstractions** --> hide the details that program components can migrate across the network&#x20;
* **Programming a "fungible" datapath**&#x20;
  * Compiler: analyze programs, and automatically generate the distribution and migration plans&#x20;
  * The end-to-end network provides a fungible datapath&#x20;
    * A logical "whole-stack" device&#x20;
    * Hiding details on vertical / horizontal distribution&#x20;
    * Whole-network program compiled to the devices&#x20;
* **Incorporating real-time changes**
  * Infrastructure program provided by the network owner&#x20;
    * Basic utilies, e.g., ACL, telemetry&#x20;
  * Tenant extensions injected in real time&#x20;
    * User-specific upgrades, e.g., DDoS, refined telemetry&#x20;
  * Research questions: programming, compiling, and optimizing these runtime changes are all interesting questions to look like&#x20;
* &#x20;**Managing elastic network apps**&#x20;
  * Network management system requires a re-design
  * Today mgmt and control solutions are box centric and focus on individual devices, but FlexNet apps can migrate across the network (not fixed location)
  * Need solutions that are app-centric&#x20;
  * New primitives are needed to name the apps, control the migration and replication without worrying about the device-level details
  * Supporting control operations with new data plane primitives&#x20;
    * E.g. app / state replication&#x20;

**Summary**

* Non-programmable: vendors control network logic, changes happen in years
* Compile-time programmable: operators control network logic, changes happen in weeks
* Runtime programmable: Users control network logic, changes happen in seconds&#x20;
* A new modality of network programmability&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://sliu583.gitbook.io/blog/specific-work/seminar-and-talk/fall-21-reading-list/a-vision-for-runtime-programmable-networks.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
