-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #279 from NikitaSkrynnik/monitor
Add feature description: Connection Monitoring API
- Loading branch information
Showing
10 changed files
with
297 additions
and
233 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 5 additions & 4 deletions
9
content/docs/concepts/features.md → content/docs/concepts/specs.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
+++ | ||
title = "Features" | ||
title = "Specs" | ||
description = "Concepts of NSM Capabilities" | ||
weight = 5 | ||
date = "2023-06-24" | ||
+++ | ||
|
||
## Features | ||
## Specs | ||
|
||
Since NSM can run in any environment, here is described only concepts of the available functionality. | ||
|
||
- [Healing](../features/healing) | ||
- [Datapath Healing](../features/datapath_healing) | ||
- [Healing](../specs/healing) | ||
- [Datapath Healing](../specs/datapath_healing) | ||
- [Connection Monitoring API](../specs/monitoring) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
+++ | ||
title = "Connection Monitoring API" | ||
description = "Concept of Connection Monitoring API in NSM" | ||
short= "monitoring" | ||
date = "2024-02-13" | ||
+++ | ||
|
||
# Connection Monitoring API | ||
|
||
## Description | ||
|
||
Connection Monitoring API allows users to monitor NSM connections. This functionality can be used to build some third-party applications. An example of such application is [NSM Dashboard](https://github.com/networkservicemesh/cmd-dashboard-ui). | ||
|
||
## Concept | ||
|
||
1. All NSM components except Network Service Client provide a Monitor Connection Server. | ||
2. Users can connect to these servers using a Monitor Connection Client and monitor connections owned by different NSM components. | ||
3. The components can send Connection Events to all subscribed Monitor Connection Clients if any connection is created, changed or deleted. | ||
|
||
Each NSM component montors connections of the next component in the chain. If the next component generates a Connection Event, the current component receives this event and sends it back to the previous component in the chain. | ||
|
||
## Types of events | ||
|
||
**INITIAL_STATE_TRANSFER:** MonitorConnection Server sends an event with this type to MonitorConnection Client when the client makes the first request. The event with this type contains all connections owned by the MonitorConnection Server. | ||
|
||
**UPDATE:** Monitor Connection Server sends an event with this type when a connection changes. For example, the state of the connection has been changed. | ||
|
||
**DELETE:** Monitor Connection Server sends event with this type when the connection has been closed. | ||
|
||
## Example of UPDATE event | ||
|
||
On the **Diagram 1** you can see when NSM sends **UPDATE** event. It has the following steps: | ||
1. NSM components monitor each other | ||
2. Forwader changes a connection context of one of connections | ||
3. Forwarder sends **UPDATE** event with the changed connection to NSMgr | ||
4. NSMgr sends **UPDATE** event with the changed connection to NSC | ||
|
||
<img src="/img/concepts/specs/monitoring/update-event.svg" style="border: 1px dashed black; padding: 0.8em"> | ||
|
||
*Diagram 1: an example of UPDATE event in NSM* | ||
|
||
## Example of INITIAL_STATE_TRANSFER, UPDATE and DELETE event | ||
|
||
**Diagram 2** shows when NSM sends **INITIAL_STATE_TRANSFER**, **UPDATE** and **DELETE** events. Steps: | ||
1. 3rd-party app start to monitor connections of NSMgr | ||
2. NSMgr sends **INITIAL_STATE_TRANSFER** event with all its connections | ||
3. NSC connects to NSE | ||
4. NSMgr sends **UPDATE** event with the new connection established between NSC and NSE | ||
5. NSC closes the connection | ||
6. NSMgr sends **DELETE** event with the closed connection | ||
|
||
<img src="/img/concepts/specs/monitoring/initial-transfer-and-delete-event.svg" style="border: 1px dashed black; padding: 0.8em"> | ||
|
||
*Diagram 2: an example of INITIAL_STATE_TRANSFER, UPDATE and DELETE event in NSM* | ||
|
||
## References | ||
|
||
- [NSM Connection Monitoring API Definition](https://github.com/networkservicemesh/api/blob/release/v1.10.0/pkg/api/networkservice/connection.proto#L79-L81) | ||
- [Code implementation](https://github.com/networkservicemesh/sdk/tree/release/v1.10.0/pkg/networkservice/common/monitor) | ||
- [See other concepts](../) |
436 changes: 215 additions & 221 deletions
436
content/docs/resources/diagramsguideline/diagrams-guideline.drawio
Large diffs are not rendered by default.
Oops, something went wrong.
3 changes: 1 addition & 2 deletions
3
content/docs/resources/diagramsguideline/diagrams-guideline.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions
3
static/img/concepts/specs/monitoring/initial-transfer-and-delete-event.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.