> For the complete documentation index, see [llms.txt](https://docs.cennso.com/components/npp/latest/llms.txt) (all documentation: [llms.txt](https://docs.cennso.com/llms.txt)). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cennso.com/components/npp/latest/architecture.md).

# Architecture

Network Performance Probe (NPP) is a Cennso extension that measures network performance from the perspective of your workloads. You can define what to measure using eight Custom Resource (CR) types:

- `PingMonitor`, `MTRMonitor`, `DownloadMonitor`, `SpeedtestMonitor` - continuous monitors that run on a schedule and expose results as Prometheus metrics.
- `PingTest`, `MTRTest`, `DownloadTest`, `SpeedtestTest` - one-shot tests that run once and write results to the CR status.

NPP runs probes that operate from inside the target pod's Linux network namespace, without running as a sidecar inside the pod or affecting its lifecycle.

## Probing mechanism

When you create a probe CR, the NPP Operator locates the target pod using the label selector from the CR spec. It then creates a probe process that enters that pod's Linux network namespace.

From inside the namespace, the probe measures network performance from the same network perspective as the pod. It sends Internet Control Message Protocol (ICMP) packets, opens Transmission Control Protocol (TCP) connections, and measures throughput on the same interfaces and via the same routes the pod uses. Network policies, routing rules, and interface configuration all apply to the probe the same way they apply to the pod.

The probe is independent of the pod's lifecycle. If the pod is replaced, the NPP Operator detects the change and reconciles. It removes the old probe and creates a new one for the replacement pod. If the probe CR is deleted, the NPP Operator removes the probe process. Reconfiguring NPP - for example, adding a probe for a new target - does not interfere with the lifecycle of the targeted pods.

```likec4 viewId=mechanism
specification {
  color cnc-blue #1E75BC
  color cnc-blue-bright #4A9FE0
  color external-blue #2E398A
  color infra-grey #848687

  element cluster {
    style {
      color cnc-blue
      multiple true
    }
  }

  element cnc-component {
    style {
      color cnc-blue
      size md
      textSize lg
      iconSize lg
    }
  }

  element cnc-cr {
    style {
      shape document
      color cnc-blue-bright
      size md
      textSize lg
      iconSize lg
    }
  }

  element cennso-actor {
    style {
      shape person
      color cnc-blue
      size md
      textSize lg
      iconSize lg
    }
  }

  element cennso-external {
    style {
      color external-blue
      size md
      textSize lg
      iconSize lg
    }
  }

  element cennso-infrastructure {
    style {
      color infra-grey
    }
  }

  relationship manages
  relationship uses {
    line dashed
  }
}

model {
  operator = cennso-actor 'Operator' {
    description 'Person who creates and manages NPP Custom Resources'
  }

  mc = cluster 'Management Cluster' {
    description 'Central management plane of Cennso'

    telemetryAgent = cennso-external 'Cennso Telemetry Agent' {
      description 'Scrapes metrics from monitor probes on the Core Cluster and propagates them to the Management Cluster'
    }
  }

  networkService = cennso-external 'Network Service' {
    description 'Destination reachable from the target pod\'s network namespace'
  }

  cc = cluster 'Core Cluster' {
    description 'Cluster running network workloads and NPP components'

    nppOperator = cnc-component 'NPP Operator' {
      description 'Kubernetes controller that watches NPP Custom Resources and manages probe lifecycles'
    }

    netns = cennso-infrastructure 'Network Namespace' {
      description 'Linux kernel network namespace shared between the target pod and the probe'

      targetPod = cennso-external 'Target Pod' {
        description 'The monitored pod. NPP does not modify or restart this pod. Reconfiguring NPP - for example, probing an additional target - does not interfere with the lifecycle of the targeted pods.'
      }

      probe = cnc-component 'Probe' {
        description 'Process created by the NPP Operator. Runs inside the same Linux network namespace as the target pod - measures from the exact same network perspective.'
      }
    }

    pingMonitor = cnc-cr 'PingMonitor' {
      description 'Continuous ICMP ping probe - exposes latency and packet loss as Prometheus metrics'
    }

    mtrMonitor = cnc-cr 'MTRMonitor' {
      description 'Continuous MTR traceroute probe - exposes per-hop latency and loss as Prometheus metrics'
    }

    downloadMonitor = cnc-cr 'DownloadMonitor' {
      description 'Continuous download throughput probe - exposes bandwidth metrics'
    }

    speedtestMonitor = cnc-cr 'SpeedtestMonitor' {
      description 'Continuous speedtest probe - exposes download/upload bandwidth, latency, and jitter as Prometheus metrics'
    }

    pingTest = cnc-cr 'PingTest' {
      description 'One-shot ICMP ping test - writes pass/fail result to CR status'
    }

    mtrTest = cnc-cr 'MTRTest' {
      description 'One-shot MTR traceroute test - writes per-hop results to CR status'
    }

    downloadTest = cnc-cr 'DownloadTest' {
      description 'One-shot download test - writes throughput result to CR status'
    }

    speedtestTest = cnc-cr 'SpeedtestTest' {
      description 'One-shot speedtest - writes bandwidth, latency, and jitter results to CR status'
    }
  }

  cc.nppOperator -> cc.netns.probe 'Creates and manages'
  cc.netns.targetPod -[uses]-> networkService 'Network path to'
  cc.netns.probe -> networkService 'Probes'
  cc.netns.probe -[uses]-> cc.netns.targetPod 'Shares network namespace'

  operator -> cc.pingMonitor 'Creates'
  operator -> cc.mtrMonitor 'Creates'
  operator -> cc.downloadMonitor 'Creates'
  operator -> cc.speedtestMonitor 'Creates'
  operator -> cc.pingTest 'Creates'
  operator -> cc.mtrTest 'Creates'
  operator -> cc.downloadTest 'Creates'
  operator -> cc.speedtestTest 'Creates'
  cc.nppOperator -[manages]-> cc.pingMonitor
  cc.nppOperator -[manages]-> cc.mtrMonitor
  cc.nppOperator -[manages]-> cc.downloadMonitor
  cc.nppOperator -[manages]-> cc.speedtestMonitor
  cc.nppOperator -[manages]-> cc.pingTest
  cc.nppOperator -[manages]-> cc.mtrTest
  cc.nppOperator -[manages]-> cc.downloadTest
  cc.nppOperator -[manages]-> cc.speedtestTest
  mc.telemetryAgent -> cc.pingMonitor 'Scrapes metrics'
  mc.telemetryAgent -> cc.mtrMonitor 'Scrapes metrics'
  mc.telemetryAgent -> cc.downloadMonitor 'Scrapes metrics'
  mc.telemetryAgent -> cc.speedtestMonitor 'Scrapes metrics'
}

views {
  view mechanism {
    title 'NPP Probing Mechanism'
    include cc, cc.nppOperator, cc.netns.**, networkService
  }

  view deployment {
    title 'NPP Deployment'
    include operator, mc.**, cc.nppOperator, cc.pingMonitor, cc.mtrMonitor, cc.downloadMonitor, cc.speedtestMonitor, cc.pingTest, cc.mtrTest, cc.downloadTest, cc.speedtestTest
  }
}
```

## Deployment architecture

NPP runs on Core Clusters alongside the workloads it monitors. The NPP Operator watches for probe CRs on the Core Cluster and manages probe lifecycles there.

Cennso Telemetry Agent, configured for your cluster, scrapes the Prometheus metrics from monitor probes and propagates them to the Management Cluster. The NPP Support Helm chart, installed separately on the Management Cluster, provides Grafana dashboards for visualizing those metrics.

```likec4 viewId=deployment
specification {
  color cnc-blue #1E75BC
  color cnc-blue-bright #4A9FE0
  color external-blue #2E398A
  color infra-grey #848687

  element cluster {
    style {
      color cnc-blue
      multiple true
    }
  }

  element cnc-component {
    style {
      color cnc-blue
      size md
      textSize lg
      iconSize lg
    }
  }

  element cnc-cr {
    style {
      shape document
      color cnc-blue-bright
      size md
      textSize lg
      iconSize lg
    }
  }

  element cennso-actor {
    style {
      shape person
      color cnc-blue
      size md
      textSize lg
      iconSize lg
    }
  }

  element cennso-external {
    style {
      color external-blue
      size md
      textSize lg
      iconSize lg
    }
  }

  element cennso-infrastructure {
    style {
      color infra-grey
    }
  }

  relationship manages
  relationship uses {
    line dashed
  }
}

model {
  operator = cennso-actor 'Operator' {
    description 'Person who creates and manages NPP Custom Resources'
  }

  mc = cluster 'Management Cluster' {
    description 'Central management plane of Cennso'

    telemetryAgent = cennso-external 'Cennso Telemetry Agent' {
      description 'Scrapes metrics from monitor probes on the Core Cluster and propagates them to the Management Cluster'
    }
  }

  networkService = cennso-external 'Network Service' {
    description 'Destination reachable from the target pod\'s network namespace'
  }

  cc = cluster 'Core Cluster' {
    description 'Cluster running network workloads and NPP components'

    nppOperator = cnc-component 'NPP Operator' {
      description 'Kubernetes controller that watches NPP Custom Resources and manages probe lifecycles'
    }

    netns = cennso-infrastructure 'Network Namespace' {
      description 'Linux kernel network namespace shared between the target pod and the probe'

      targetPod = cennso-external 'Target Pod' {
        description 'The monitored pod. NPP does not modify or restart this pod. Reconfiguring NPP - for example, probing an additional target - does not interfere with the lifecycle of the targeted pods.'
      }

      probe = cnc-component 'Probe' {
        description 'Process created by the NPP Operator. Runs inside the same Linux network namespace as the target pod - measures from the exact same network perspective.'
      }
    }

    pingMonitor = cnc-cr 'PingMonitor' {
      description 'Continuous ICMP ping probe - exposes latency and packet loss as Prometheus metrics'
    }

    mtrMonitor = cnc-cr 'MTRMonitor' {
      description 'Continuous MTR traceroute probe - exposes per-hop latency and loss as Prometheus metrics'
    }

    downloadMonitor = cnc-cr 'DownloadMonitor' {
      description 'Continuous download throughput probe - exposes bandwidth metrics'
    }

    speedtestMonitor = cnc-cr 'SpeedtestMonitor' {
      description 'Continuous speedtest probe - exposes download/upload bandwidth, latency, and jitter as Prometheus metrics'
    }

    pingTest = cnc-cr 'PingTest' {
      description 'One-shot ICMP ping test - writes pass/fail result to CR status'
    }

    mtrTest = cnc-cr 'MTRTest' {
      description 'One-shot MTR traceroute test - writes per-hop results to CR status'
    }

    downloadTest = cnc-cr 'DownloadTest' {
      description 'One-shot download test - writes throughput result to CR status'
    }

    speedtestTest = cnc-cr 'SpeedtestTest' {
      description 'One-shot speedtest - writes bandwidth, latency, and jitter results to CR status'
    }
  }

  cc.nppOperator -> cc.netns.probe 'Creates and manages'
  cc.netns.targetPod -[uses]-> networkService 'Network path to'
  cc.netns.probe -> networkService 'Probes'
  cc.netns.probe -[uses]-> cc.netns.targetPod 'Shares network namespace'

  operator -> cc.pingMonitor 'Creates'
  operator -> cc.mtrMonitor 'Creates'
  operator -> cc.downloadMonitor 'Creates'
  operator -> cc.speedtestMonitor 'Creates'
  operator -> cc.pingTest 'Creates'
  operator -> cc.mtrTest 'Creates'
  operator -> cc.downloadTest 'Creates'
  operator -> cc.speedtestTest 'Creates'
  cc.nppOperator -[manages]-> cc.pingMonitor
  cc.nppOperator -[manages]-> cc.mtrMonitor
  cc.nppOperator -[manages]-> cc.downloadMonitor
  cc.nppOperator -[manages]-> cc.speedtestMonitor
  cc.nppOperator -[manages]-> cc.pingTest
  cc.nppOperator -[manages]-> cc.mtrTest
  cc.nppOperator -[manages]-> cc.downloadTest
  cc.nppOperator -[manages]-> cc.speedtestTest
  mc.telemetryAgent -> cc.pingMonitor 'Scrapes metrics'
  mc.telemetryAgent -> cc.mtrMonitor 'Scrapes metrics'
  mc.telemetryAgent -> cc.downloadMonitor 'Scrapes metrics'
  mc.telemetryAgent -> cc.speedtestMonitor 'Scrapes metrics'
}

views {
  view mechanism {
    title 'NPP Probing Mechanism'
    include cc, cc.nppOperator, cc.netns.**, networkService
  }

  view deployment {
    title 'NPP Deployment'
    include operator, mc.**, cc.nppOperator, cc.pingMonitor, cc.mtrMonitor, cc.downloadMonitor, cc.speedtestMonitor, cc.pingTest, cc.mtrTest, cc.downloadTest, cc.speedtestTest
  }
}
```

## Read more

For more details about each CR, see the concept documents:

- [PingMonitor](https://docs.cennso.com/components/npp/latest/concepts/ping-monitor.md)
- [MTRMonitor](https://docs.cennso.com/components/npp/latest/concepts/mtr-monitor.md)
- [DownloadMonitor](https://docs.cennso.com/components/npp/latest/concepts/download-monitor.md)
- [SpeedtestMonitor](https://docs.cennso.com/components/npp/latest/concepts/speedtest-monitor.md)
- [PingTest](https://docs.cennso.com/components/npp/latest/concepts/ping-test.md)
- [MTRTest](https://docs.cennso.com/components/npp/latest/concepts/mtr-test.md)
- [DownloadTest](https://docs.cennso.com/components/npp/latest/concepts/download-test.md)
- [SpeedtestTest](https://docs.cennso.com/components/npp/latest/concepts/speedtest-test.md)
