Skip to content

Commit

Permalink
optimize dou
Browse files Browse the repository at this point in the history
  • Loading branch information
severindellsperger committed Aug 19, 2024
1 parent a6fe946 commit 27a7985
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 28 deletions.
23 changes: 12 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,25 @@


## Overview
HawkEye is an advanced controller designed to bring Intent-Based Networking (IBN) to life within Segment Routing over IPv6 (SRv6) networks. The project showcases how HawkEye translates high-level user intents into precise network instructions (segments), ensuring seamless and efficient network management.
HawkEye is an advanced controller designed to facilitate Intent-Based Networking (IBN) and Segment Routing over IPv6 (SRv6). It integrates with open-source projects like [Jalapeno](https://github.com/cisco-open/jalapeno) and the [Jalapeno API Gateway](https://github.com/jalapeno-api-gateway), and utilizes standardized protocols such as [BMP](https://datatracker.ietf.org/doc/rfc7854/) and [YANG-Push](https://datatracker.ietf.org/doc/rfc8641/). Additionally, HawkEye leverages [Consul](https://www.consul.io/) as a service registry to gather critical information about network services and perform health checks.

![HawkEye Architecture](docs/images/Hawkv6-HawkEye-Architecture.drawio.svg)
When receiving path requests from clients via gRPC, HawkEye calculates optimal paths based on the specified intents and maps these paths to segment lists, which are then returned to the clients for packet encapsulation. The application continuously monitors the network, adjusting paths as network conditions evolve. If a change is necessary to maintain the intent, an updated segment list is automatically provided to the client, ensuring that the network meets the desired requirements.

HawkEye continuously maintains an up-to-date view of the network by requesting and subscribing to data from the Jalapeno API Gateway (JAGW). This real-time data allows HawkEye to monitor network changes and respond proactively. Additionally, HawkEye integrates with Consul as a service registry, obtaining vital information about network services and conducting health checks to ensure optimal performance.
![HawkEye Architecture](docs/images/Hawkv6-High-Level-Architecture-high.drawio.svg)

HawkEye features a [gRPC API](https://github.com/hawkv6/proto/blob/main/intent.proto) that allows clients within the SRv6 network to send path requests, including specified intents, directly to the controller. Upon receiving a path request or detecting network changes, HawkEye calculates the optimal path and generates a corresponding segment list to ensure the network's behavior aligns with the intended objectives.
## Key Features

- **Intent Fulfillment**: HawkEye processes user-defined intents, such as ensuring low latency, high bandwidth, or specific service function chaining, and calculates optimal paths in the SRv6 network to meet these requirements. It returns the segment list that must be applied to the packet to achieve the desired behavior.

## Key Features
- **Intent Fulfillment**: HawkEye processes user-defined intents, such as ensuring low latency, high bandwidth, or specific service chaining, and calculates optimal paths in the SRv6 network to meet these requirements. It returns the segment list that must be applied to the packet to achieve the desired behavior.
- **Real-Time Network Monitoring**: HawkEye continuously monitors network performance metrics, including latency, jitter, and packet loss. It responds to network changes such as link removals or performance metric variations, ensuring that the network adheres to the specified intents. This task leverages components like [Jalapeno](https://github.com/cisco-open/jalapeno), [JAGW](https://github.com/jalapeno-api-gateway), [Consul](https://www.consul.io/), the [generic-processor](https://github.com/hawkv6/generic-processor), and the [clab-telemetry-linker](https://github.com/hawkv6/clab-telemetry-linker).

- **Real-Time Network Monitoring**: HawkEye continuously monitors network performance metrics, including latency, jitter, and packet loss. It responds to network changes in real-time, ensuring that the network adheres to the specified intents.
- **Event-Driven Architecture**: HawkEye operates in an event-driven manner, automatically recalculating paths and updating segment lists when network conditions change or when service health checks indicate issues. Operators can define thresholds that determine when a path should be switched, preventing unnecessary path flapping. This feature ensures that the network remains responsive and reliable.

- **Event-Driven Architecture**: HawkEye operates in an event-driven manner, automatically recalculating paths and updating segment lists when network conditions change or when service health checks indicate issues. The operator can define a threshold which defines when the path should be switched. This feature ensures that the network remains responsive and reliable and does not flap between paths unnecessarily.
- **Service Registry Integration**: HawkEye integrates with [Consul](https://www.consul.io/) to monitor service availability and health. This integration ensures that service function chaining remains intact and that paths are adjusted if a service instance becomes unavailable.

- **Interoperability**: HawkEye leverages standardized technologies like YANG-Push for telemetry and BMP for performance measurement, ensuring compatibility with existing network hardware and software.
- **Session Management**: HawkEye tracks ongoing sessions for each client, maintaining a record of path requests and updates. This session management capability allows for seamless adjustments to paths as network conditions change, ensuring continuous intent compliance.

- **Interoperability**: HawkEye leverages standardized technologies like YANG-Push for telemetry and BMP for performance measurement, ensuring compatibility with existing network hardware and software.

## Design Considerations

Expand Down Expand Up @@ -78,7 +79,7 @@ sudo ./bin/hawkeye
- Additional information can be found in the [hawkv6 testnetwork documentation](https://github.com/hawkv6/network).

3. Confirm that `clab-telemetry-linker` is active and running.
- Detailed instructions are available in the [clab-telemetry-linker documentation](https://github.com/hawkv6/generic-processor).
- Detailed instructions are available in the [clab-telemetry-linker documentation](https://github.com/hawkv6/clab-telemetry-linker).

4. Confirm that the `generic-processor` is active and running.
- Detailed instructions are available in the [generic processor documentation](https://github.com/hawkv6/generic-processor).
Expand All @@ -90,5 +91,5 @@ sudo ./bin/hawkeye

## Additional Information
- Environment variables are documented in the [env documentation](docs/env.md).
- The proto definiton is included via submodule and can be found [here](https://github.com/hawkv6/proto/blob/main/intent.proto).
- The proto/API definiton is included via submodule and can be found [here](https://github.com/hawkv6/proto/blob/main/intent.proto).
- Limitations are documented in the [limitations documentation](docs/limitations.md).
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"ipv6_destination_address": "2001:db8:b::10",
"ipv6_source_address": "2001:db8:a::10",
"ipv6_destination_address": "2001:db8:b::10",
"intents": [
{
"type": "INTENT_TYPE_FLEX_ALGO",
Expand Down
32 changes: 17 additions & 15 deletions docs/design.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,22 @@ The graph is built and continuously updated based on network events and data fro

The graph can be divided into subgraphs based on Flexible Algorithms (Flex Algos). This allows for path calculations that consider only the nodes and links within the relevant subgraph.


## Service Registry
### Overview
As already mentioned, HawkEye integrates with Consul to monitor service availability and health. This integration ensures that service function chaining remains intact and that paths are adjusted if a service instance becomes unavailable. The service package is responsible for handling communication with the Consul service registry, retrieving service information, and health checks. It updates the cache with service data, which is then used in path calculations. The service package also sends update notifications when service information changes.

### Service Registration and Health Checks
As soon a service instance is operational, it registers with Consul, providing essential information such as the service name and the SRv6 SID. Consul then performs health checks on the service instance, ensuring that it is operational and healthy. HawkEye's service package retrieves this information from Consul and updates the cache accordingly.

Service Registery Overview | Service Health Check Overview
:-------------------------:|:-------------------------:
![Service Registry Healthy Nodes](images/Hawkv6-HawkEye-Consul-Healthy-Nodes.png) | ![SERA-1 Health Check Overview](images/Hawkv6-HawkEye-SERA1-Health-Check-Overview.png)

As soon as a health check fails, the service node is marked as unhealthy and excluded from the calculation:

![SERA-1 Failing Health Check](images/Hawkv6-HawkEye-SERA1-Failing-Health-Check.png)

## Calculation Logic

HawkEye features two main types of calculations: shortest path calculation and service function chain (SFC) calculation. Both are based on an extended Dijkstra algorithm, implemented in the calculation package, which uses data from the graph and cache to determine the optimal path or service function chain, expressed as a segment list.
Expand Down Expand Up @@ -137,21 +153,7 @@ For example, if the maximum bearable latency is set to 10 ms, the link between X

### Service Function Chain Calculation

HawkEye's service function chain calculation determines the optimal sequence of service functions applied to packets as they traverse the network. This involves calculating multiple shortest paths between service points, ensuring the packet is processed by the specified services in the correct order. The process, based on the Dijkstra algorithm, calculates the shortest path between the source node and the first service, followed by paths between services, and finally, the path between the last service and the destination node. The total cost is the sum of these paths.

#### Service Registry

Only service nodes marked as healthy and operational in the Consul service registry are considered:



Service Registery Overview | Service Health Check Overview
:-------------------------:|:-------------------------:
![Service Registry Healthy Nodes](images/Hawkv6-HawkEye-Consul-Healthy-Nodes.png) | ![SERA-1 Health Check Overview](images/Hawkv6-HawkEye-SERA1-Health-Check-Overview.png)

As soon as a health check fails, the service node is marked as unhealthy and excluded from the calculation:

![SERA-1 Failing Health Check](images/Hawkv6-HawkEye-SERA1-Failing-Health-Check.png)
HawkEye's service function chain calculation determines the optimal sequence of service functions applied to packets as they traverse the network. This involves calculating multiple shortest paths between healthy service instances , ensuring the packet is processed by the specified services in the correct order. The process, based on the Dijkstra algorithm, calculates the shortest path between the source node and the first service, followed by paths between services, and finally, the path between the last service and the destination node. The total cost is the sum of these paths.

#### Example

Expand Down
4 changes: 4 additions & 0 deletions docs/images/Hawkv6-High-Level-Architecture-high.drawio.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/intents/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This section provides a detailed overview of all available intents within the platform. Each intent serves as a unique identifier for a specific action that can be initiated, enabling the platform to interpret and execute user requests accordingly.

For each intent, an example is provided that includes the relevant HawkWing configuration and the corresponding API request. The examples are organized in the `/api` folder, where [Kreya API Files](https://kreya.app/) can be easily imported for practical use. Each example has been thoroughly tested within the provided test network environment, offering practical references for implementing these intents in various configurations.
For each intent, an example is provided that includes the relevant HawkWing configuration and the corresponding API request. The examples are organized in the [`/api`](/api/) folder, where [Kreya API Files](https://kreya.app/) can be easily imported for practical use. Each example has been thoroughly tested within the provided test network environment, offering practical references for implementing these intents in various configurations.

## Intents Categories

Expand Down

0 comments on commit 27a7985

Please sign in to comment.