diff --git a/src/rust/uisp_integration/src/strategies/full2.rs b/src/rust/uisp_integration/src/strategies/full2.rs index 5b9448ab..3b2671e0 100644 --- a/src/rust/uisp_integration/src/strategies/full2.rs +++ b/src/rust/uisp_integration/src/strategies/full2.rs @@ -287,12 +287,27 @@ pub async fn build_full_network_v2( } } + // Process promote_to_root list + let promote_to_root_set: std::collections::HashSet = + config.integration_common.promote_to_root + .as_ref() + .map(|list| list.iter().cloned().collect()) + .unwrap_or_default(); + + if !promote_to_root_set.is_empty() { + info!("Applying promote_to_root rules for {} nodes: {:?}", + promote_to_root_set.len(), promote_to_root_set); + } + // Write the network.json file let mut network_json = serde_json::Map::new(); let mut visited = HashSet::new(); for (name, node_info) in parents .iter() - .filter(|(_name, parent)| parent.parent_name == root_site_name) + .filter(|(_name, parent)| { + // Include if it's a direct child of root OR if it's in promote_to_root list + parent.parent_name == root_site_name || promote_to_root_set.contains(_name.as_str()) + }) { network_json.insert( name.into(), -- knotmirror 0.0.1 From c956770c12438622e716ab33c5cb75a63e129a97 Mon Sep 17 00:00:00 2001 From: rchac Date: Sat, 30 Aug 2025 04:33:07 +0000 Subject: [PATCH 2/2] updates --- docs-es/v2.0/integrations-es.md | 28 ++++++++++++++++++++++++++++ docs/v2.0/integrations.md | 28 ++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) diff --git a/docs-es/v2.0/integrations-es.md b/docs-es/v2.0/integrations-es.md index 2a0d23a2..f26e4849 100644 --- a/docs-es/v2.0/integrations-es.md +++ b/docs-es/v2.0/integrations-es.md @@ -40,6 +40,32 @@ strategy = "ap_only" - Elija `ap_only` para la mayoría de implementaciones a menos que necesite agregación de tráfico a nivel de sitio - Use `full` solamente si requiere representación completa de la topología de red y tiene recursos CPU adecuados +### Promover Nodos a Raíz (Optimización de Rendimiento) + +Cuando use la estrategia de topología `full`, puede encontrar cuellos de botella de rendimiento del CPU donde todo el tráfico fluye a través de un solo sitio raíz, limitando el throughput a lo que un solo núcleo de CPU puede manejar. + +La función **promote_to_root** soluciona esto promoviendo sitios específicos a nodos de nivel raíz, distribuyendo la regulación de tráfico entre múltiples núcleos de CPU. + +**Configuración:** +1. Navegue a Integración → Común en la interfaz web +2. En el campo "Promover Nodos a Raíz", ingrese un nombre de sitio por línea: +``` +Sitio_Remoto_Alpha +Sitio_Remoto_Beta +Centro_Datos_Oeste +``` + +**Beneficios:** +- Elimina el cuello de botella de CPU único para redes con sitios remotos +- Distribuye la regulación de tráfico entre múltiples núcleos de CPU +- Mejora el rendimiento general de la red para topologías grandes +- Funciona tanto con integraciones de Splynx como de UISP + +**Cuándo Usar:** +- Redes con múltiples sitios remotos de alta capacidad +- Cuando use la estrategia de topología `full` y experimente limitaciones de CPU +- Redes grandes donde el tráfico del sitio raíz excede la capacidad de un solo núcleo + ### Acceso API de Splynx La integración con Splynx utiliza autenticación Básica. Para usar este tipo de autenticación, asegúrese de habilitar el [Acceso No Seguro](https://splynx.docs.apiary.io/#introduction/authentication) en la configuración de su clave API de Splynx. Además, la clave API de Splynx debe tener los permisos adecuados. @@ -114,6 +140,8 @@ LibreQoS soporta múltiples estrategias de topología para la integración con U - Use `ap_only` para mejor rendimiento cuando no se necesita agregación de sitios - Use `flat` solo cuando el máximo rendimiento es crítico y no necesita ninguna jerarquía +**Nota de Rendimiento:** Cuando use la estrategia `full` con redes grandes, considere usar la función **promote_to_root** (vea [Promover Nodos a Raíz](#promover-nodos-a-raíz-optimización-de-rendimiento) arriba) para distribuir la carga del CPU entre múltiples núcleos. + ### Estrategias de Manejo de Suspensiones Configure cómo LibreQoS maneja las cuentas de clientes suspendidos: diff --git a/docs/v2.0/integrations.md b/docs/v2.0/integrations.md index c9851383..ba704ae4 100644 --- a/docs/v2.0/integrations.md +++ b/docs/v2.0/integrations.md @@ -40,6 +40,32 @@ strategy = "ap_only" - Choose `ap_only` for most deployments unless you need site-level traffic aggregation - Only use `full` if you require complete network topology representation and have adequate CPU resources +### Promote to Root Nodes (Performance Optimization) + +When using `full` topology strategy, you may encounter CPU performance bottlenecks where all traffic flows through a single root site, limiting throughput to what one CPU core can handle. + +The **promote_to_root** feature solves this by promoting specific sites to root-level nodes, distributing traffic shaping across multiple CPU cores. + +**Configuration:** +1. Navigate to Integration → Common in the WebUI +2. In the "Promote to Root Nodes" field, enter one site name per line: +``` +Remote_Site_Alpha +Remote_Site_Beta +Datacenter_West +``` + +**Benefits:** +- Eliminates single-CPU bottleneck for networks with remote sites +- Distributes traffic shaping across multiple CPU cores +- Improves overall network performance for large topologies +- Works with both Splynx and UISP integrations + +**When to Use:** +- Networks with multiple high-capacity remote sites +- When using `full` topology strategy and experiencing CPU limitations +- Large networks where root site traffic exceeds single-core capacity + ### Splynx API Access The Splynx Integration uses Basic authentication. For using this type of authentication, please make sure you enable [Unsecure access](https://splynx.docs.apiary.io/#introduction/authentication) in your Splynx API key settings. Also the Splynx API key should be granted access to the necessary permissions. @@ -115,6 +141,8 @@ LibreQoS supports multiple topology strategies for UISP integration to balance C - Use `ap_only` for better performance when site aggregation isn't needed - Use `flat` only when maximum performance is critical and you don't need any hierarchy +**Performance Note:** When using `full` strategy with large networks, consider using the **promote_to_root** feature (see [Promote to Root Nodes](#promote-to-root-nodes-performance-optimization) above) to distribute CPU load across multiple cores. + ### Suspension Handling Strategies Configure how LibreQoS handles suspended customer accounts: