<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc="yes"?>
<?rfc tocdepth="3"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>

<rfc
    category="std"
    docName="draft-zhangb-cats-csma-implementation-00"
    ipr="trust200902"
    submissionType="IETF"
    consensus="true">

  <front>
    <title abbrev="CATS C-SMA Functional Implementation">
      CATS Service Metric Agent (C-SMA) Functional Implementation
    </title>

    <author fullname="Bin Zhang" initials="B." surname="Zhang" role="editor">
      <organization>Pengcheng Laboratory</organization>
      <address>
        <postal>
          <street>Sibilong Street</street>
          <city>Shenzhen</city>
          <region>Guangdong</region>
          <code>518055</code>
          <country>CN</country>
        </postal>
        <email>zhangb@pcl.ac.cn</email>
      </address>
    </author>



    <date year="2026" month="July" day="27"/>

    <area>Routing</area>
    <workgroup>Computing-Aware Traffic Steering</workgroup>
    <keyword>CATS</keyword>
    <keyword>C-SMA</keyword>
    <keyword>service metric agent</keyword>
    <keyword>metric collection</keyword>
    <keyword>aggregation</keyword>
    <keyword>protocol adaptation</keyword>
    <keyword>policy enforcement</keyword>

    <abstract>
      <t>The Computing-Aware Traffic Steering (CATS) framework introduces the CATS Service Metric Agent (C-SMA) as the functional entity responsible for collecting service capabilities and status, and reporting them to CATS Path Selectors (C-PSes). While existing drafts define the metrics and high-level framework, the concrete functional behavior, internal architecture, and operational procedures of the C-SMA remain underspecified.</t>
      <t>This document fills that gap by defining the functional implementation of the C-SMA. Specifically, it specifies how the C-SMA collects metrics from multiple Service Contact Instances (SCIs) within a service site; how it validates, and caches these metrics; how it adapts to various control-plane protocols for metric distribution; how it enforces local policies and security policies; and how it maintains synchronization with the C-PS under dynamic conditions. This document complements <xref target="I-D.ietf-cats-framework"/> and <xref target="I-D.zhangb-cats-service-metrics-op"/> by providing the operational execution layer for the C-SMA.</t>
    </abstract>
  </front>

  <middle>

    <section title="Introduction" anchor="intro">
      <t>The Computing-Aware Traffic Steering (CATS) framework <xref target="I-D.ietf-cats-framework"/> defines the CATS Service Metric Agent (C-SMA) as a functional component that gathers information about service sites and server resources, as well as the status of the different service instances. The C-SMA advertises these metrics to CATS Path Selectors (C-PSes) to enable compute-aware traffic steering decisions.</t>
      <t>However, the framework does not specify:</t>
      <t>
        <list style="symbols">
          <t>How a C-SMA collects metrics from multiple Service Contact Instances (SCIs) within a service site.</t>
          <t>How a C-SMA validates, and caches metrics before reporting.</t>
          <t>How a C-SMA adapts to different control-plane deployment models (centralized, distributed, hybrid).</t>
          <t>How a C-SMA enforces local policies, security policies, and update control policies.</t>
          <t>How a C-SMA handles failures, partitions, and recovery scenarios.</t>
        </list>
      </t>
      <t>This document defines the functional implementation of the C-SMA to address these gaps. It specifies the internal architecture, metric collection and validation mechanisms, protocol adaptation, policy enforcement, and failure handling required for a C-SMA to operate effectively within the CATS framework.</t>
      <t>The C-SMA acts as the bridge between the service site (and its SCIs) and the CATS control plane. It is responsible for:</t>
      <t>
        <list style="symbols">
          <t>Collecting metrics from one or more SCIs within the service site.</t>
          <t>Validating and sanitizing metrics to prevent erroneous or malicious data from influencing traffic steering.</t>
          <t>Caching metrics and maintaining soft-state to handle transient failures.</t>
          <t>Adapting to the control-plane protocol used in the deployment (RESTful API, BGP-LS, GRASP, etc.).</t>
          <t>Enforcing local policies (e.g., metric transformation, update throttling, security labels).</t>
          <t>Authenticating SCIs and C-PSes, and protecting metric integrity.</t>
          <t>Handling failures of SCIs, C-PSes, and network partitions.</t>
        </list>
      </t>

      <section title="Requirements Language" anchor="requirements-language">
        <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when, they appear in all capitals, as shown here.</t>
      </section>
    </section>

    <section title="Terminology" anchor="terminology">
      <t>This document makes use of the terms defined in <xref target="I-D.ietf-cats-framework"/> and <xref target="I-D.zhangb-cats-service-metrics-op"/>. In particular:</t>
      <t>
        <list style="symbols">
          <t>CS-ID (CATS Service ID): An identifier for a service.</t>
          <t>CSCI-ID (CATS Service Contact Instance ID): An identifier for a service contact instance.</t>
          <t>Global Available Slots (GAS): The maximum number of concurrent requests a service site is willing and able to serve for a specific CS-ID at a given time.</t>
          <t>Computing Time: The time required for the site to perform one service request.</t>
          <t>C-SMA (CATS Service Metric Agent): The functional entity that collects service metrics and advertises them to C-PSes.</t>
          <t>C-PS (CATS Path Selector): The functional entity that selects paths towards service sites and instances.</t>
        </list>
      </t>
      <t>Additionally, the following terms are used in this document:</t>
      <t>
        <list style="symbols">
          <t>Service Site: A location that hosts one or more SCIs and their underlying service instances.</t>
          <t>SCI Report: A message sent by an SCI to the C-SMA containing aggregated metrics and status.</t>
          <t>Metric Cache: A local data structure maintained by the C-SMA to store the most recent metrics from each SCI.</t>
          <t>Update Trigger: An event that causes the C-SMA to send a metric update to the C-PS.</t>
          <t>Policy Engine: The component within the C-SMA that evaluates and enforces local policies on metric reporting.</t>
          <t>Protocol Adapter: The component within the C-SMA that adapts internal metric representations to the wire format required by the control-plane protocol.</t>
        </list>
      </t>
    </section>

    <section title="C-SMA Functional Architecture" anchor="architecture">
      <t>A C-SMA is logically composed of the following internal functional components:</t>

      <figure anchor="fig-arch" title="C-SMA Internal Functional Components">
        <artwork><![CDATA[
+----------------------------------------------------------------+
|                     CATS Service Metric Agent (C-SMA)           |
|  +----------------+                      +------------------+   |
|  | SCI Collection |                      | policy Engine    |   |
|  | Interface (SI) |------------          | (PE)             |   |
|  +--------+-------+           |          +--------+---------+   |
|           |                   |                   |             |
|  +--------v-------+  +--------v-------+  +------v-----------+   |
|  | Metric Cache   |  | Validator &    |  | Update Controller|   |
|  | (MC)           |  | Sanitizer (VS) |  | (UC)             |   |
|  +--------+-------+  +--------+-------+  +------+-----------+   |
|           |                   |                   |             |
|  +--------v-------------------v-------------------v----------+  |
|  |              Protocol Adapter (PA)                        |  |
|  +---------------------------+-------------------------------+  |
|                              |                                  |
+------------------------------v----------------------------------+
                                  |
                          +-------v--------+
                          |     C-PS       |
                          +----------------+
]]></artwork>
      </figure>

      <t>The internal components of a C-SMA are defined as follows:</t>
      <t>
        <list style="hanging">
          <t hangText="SCI Collection Interface (SI):">Responsible for receiving metric reports from SCIs within the service site. It supports multiple transport protocols (e.g., gRPC, HTTP/2, MQTT, internal message bus) and manages the lifecycle of SCI connections.</t>
          <t hangText="Metric Cache (MC):">Responsible for storing the most recent metrics from each SCI. It provides fast lookup for the MA, PE, and UC. The cache implements time-to-live (TTL) and soft-state aging to handle stale data.</t>
          <t hangText="Validator &amp; Sanitizer (VS):">Responsible for validating incoming SCI reports for correctness and sanity. It checks for out-of-range values, sudden anomalous changes, duplicate or out-of-sequence reports, and format compliance. Invalid reports are logged and optionally dropped or quarantined.</t>
          <t hangText="Policy Engine (PE):">Responsible for enforcing local policies on metric reporting. Policies include metric transformation, security label assignment or verification, cost and reputation policies, and update suppression during maintenance windows.</t>
          <t hangText="Update Controller (UC):">Responsible for determining when and how often to send updates to the C-PS. It implements threshold-based, event-based, and periodic update policies. It also implements rate limiting and burst control.</t>
          <t hangText="Protocol Adapter (PA):">Responsible for adapting internal metric representations to the wire format required by the control-plane protocol. It supports multiple protocols (e.g., RESTful API, BGP-LS, GRASP, NETCONF/YANG-Push) and can be extended for new protocols.</t>
        </list>
      </t>

      <section title="C-SMA Position in CATS Framework" anchor="position">
        <t>The C-SMA sits between the service site (SCIs) and the CATS control plane (C-PS). Its relationships with other CATS components are:</t>
        <t>
          <list style="symbols">
            <t>The C-SMA receives metric reports from one or more SCIs within the service site.</t>
            <t>The C-SMA validates, and caches these metrics.</t>
            <t>The C-SMA advertises metrics to the C-PS via the control-plane protocol.</t>
            <t>The C-SMA does not directly interact with clients, C-TCs, or CATS-Forwarders.</t>
            <t>The C-SMA may be co-located with an SCI, an Egress CATS-Forwarder, or deployed as a standalone component within the service site.</t>
          </list>
        </t>
        <t>The C-SMA is the authoritative source of computing metrics for the service site. The C-PS relies on the C-SMA's reports to build the Computing Service Table.</t>
      </section>
    </section>

    <section title="Metric Collection from SCIs" anchor="collection">
      <t>The SCI Collection Interface (SI) receives metric reports from SCIs. The interface supports the following modes:</t>

      <section title="Collection Interface" anchor="collection-interface">
        <t>
          <list style="hanging">
            <t hangText="Push Mode (Recommended):">SCIs proactively push metric reports to the C-SMA at configurable intervals or upon significant changes. This reduces polling overhead and enables near-real-time updates. The SI MUST support at least one of the following push transports: gRPC streaming (bidirectional), HTTP/2 with Server-Sent Events (SSE), MQTT publish/subscribe, or Internal message bus (e.g., Kafka, RabbitMQ).</t>
            <t hangText="Pull Mode:">The C-SMA periodically queries SCIs for metrics. This is useful when SCIs cannot initiate connections (e.g., behind NAT or firewall). The SI MUST support HTTP GET or gRPC unary calls for pull mode.</t>
            <t hangText="Hybrid Mode:">A combination of push and pull. SCIs push routine updates, and the C-SMA pulls on-demand during recovery or anomaly detection.</t>
          </list>
        </t>
        <t>The SI MUST support multiple concurrent SCI connections. Each connection is identified by the CSCI-ID and authenticated.</t>
      </section>

      <section title="Metric Validation and Sanitization" anchor="validation">
        <t>The Validator &amp; Sanitizer (VS) inspects every incoming SCI report before it enters the Metric Cache. The VS performs the following checks:</t>
        <t>
          <list style="hanging">
            <t hangText="Range Validation:">Each metric value MUST fall within a valid range: GAS: 0 to MAX_UINT32; Computing Time: 0 to 3600000 ms (1 hour); Cost: 0 to MAX_UINT32; Reputation: 0 to 10; Security Label: 0 to 10. Values outside these ranges are rejected.</t>
            <t hangText="Rate-of-Change Validation:">The VS detects anomalous changes: GAS change &gt; 50% within 1 second without corresponding health change; Computing Time change &gt; 100% within 1 second; Health status flapping (&gt; 3 transitions within 10 seconds). Anomalous reports MAY be quarantined for manual review or accepted with a warning flag.</t>
            <t hangText="Sequence Validation:">The VS checks the sequence number or timestamp to detect duplicate, out-of-order, or replayed reports. Old reports are discarded.</t>
            <t hangText="Cross-Metric Consistency:">The VS checks consistency across metrics: If all SCIs are UNHEALTHY, Site_GAS MUST be 0; If Site_GAS &gt; 0, at least one SCI MUST be HEALTHY; Computing Time SHOULD be &gt; 0 if GAS &gt; 0.</t>
            <t hangText="Sanitization:">The VS MAY apply smoothing filters (e.g., moving average) to reduce noise in frequently fluctuating metrics.</t>
          </list>
        </t>
      </section>
    </section>

    <section title="Metric Caching and State Management" anchor="caching">
      <t>The Metric Cache (MC) stores the most recent validated metrics from each SCI. The cache is organized as follows:</t>

      <table anchor="tbl-cache">
        <name>Metric Cache Structure</name>
        <thead>
          <tr>
            <th>CSCI-ID</th>
            <th>CS-ID</th>
            <th>GAS</th>
            <th>Comp Time (ms)</th>
            <th>Health Status</th>
          </tr>
        </thead>
        <tbody>
          <tr><td>188.3.67.3:67</td><td>AR1</td><td>400</td><td>5</td><td>HEALTHY</td></tr>
          <tr><td>188.3.67.3:68</td><td>AR2</td><td>100</td><td>15</td><td>HEALTHY</td></tr>
          <tr><td>188.3.67.4:69</td><td>AR1</td><td>600</td><td>6</td><td>HEALTHY</td></tr>
          <tr><td>188.3.67.4:70</td><td>LLM1</td><td>300</td><td>12</td><td>DEGRADED</td></tr>
        </tbody>
      </table>

      <section title="Local Metric Cache" anchor="cache-details">
        <t>Each entry includes: CSCI-ID and CS-ID; all reported metrics (GAS, Computing Time, optional metrics); Health status; Timestamp of last update; Sequence number of last report; TTL (time-to-live) for soft-state aging.</t>
        <t>The MC provides O(1) lookup by CSCI-ID and supports range queries by CS-ID for aggregation.</t>
      </section>

      <section title="Soft-State and Aging" anchor="soft-state">
        <t>The MC implements soft-state aging to handle SCI failures or network partitions:</t>
        <t>
          <list style="hanging">
            <t hangText="TTL-Based Expiration:">Each cache entry has a TTL (e.g., 2x the expected reporting interval). If no update is received within the TTL, the entry is marked as STALE.</t>
            <t hangText="STALE Handling:">When an entry becomes STALE, the C-SMA MAY send a pull request to the SCI. If no response is received within a grace period, the SCI is marked as UNHEALTHY and its GAS contribution is set to 0. The C-SMA sends an update to the C-PS reflecting the reduced capacity.</t>
            <t hangText="Hard-State vs. Soft-State:">The C-SMA maintains hard-state for static information (e.g., CS-ID to CSCI-ID mappings) and soft-state for dynamic metrics (e.g., GAS, Computing Time).</t>
            <t hangText="Cache Size Management:">The MC MUST implement a maximum cache size. When the limit is reached, the least-recently-used (LRU) entries are evicted. Eviction of an entry triggers a withdrawal advertisement to the C-PS.</t>
          </list>
        </t>
      </section>

      <section title="Per-SCI State Tracking" anchor="state-tracking">
        <t>The C-SMA maintains a state machine for each SCI:</t>
        <t>
          <list style="symbols">
            <t>ACTIVE: The SCI has been discovered but not yet confirmed healthy.</t>
            <t>HEALTHY: The SCI is reporting metrics normally.</t>
            <t>STALE: No report received within TTL. The C-SMA attempts recovery.</t>
            <t>FAILED: The SCI is considered unreachable. Its metrics are withdrawn.</t>
          </list>
        </t>
        <t>State transitions trigger updates to the C-PS as appropriate.</t>
      </section>
    </section>

    <section title="Control-Plane Protocol Adaptation" anchor="protocol-adaptation">
      <t>The Protocol Adapter (PA) supports multiple control-plane protocols for different deployment models.</t>

      <section title="Centralized Model: Northbound Interface" anchor="centralized">
        <t>In the centralized model (e.g., SDN controller), the C-SMA acts as an application that reports metrics to a centralized C-PS via a northbound interface. The PA supports:</t>
        <t>
          <list style="hanging">
            <t hangText="RESTful API (HTTP/HTTPS):">The C-SMA sends metric reports as JSON or XML payloads to the C-PS REST API endpoint. Supported operations include POST /cats/metrics (publish a new or updated metric set), PUT /cats/metrics/{csci-id} (update metrics for a specific CSCI-ID), DELETE /cats/metrics/{csci-id} (withdraw metrics for a failed SCI), and GET /cats/metrics/{csci-id} (retrieve cached metrics for reconciliation).</t>
            <t hangText="gRPC:">The C-SMA establishes a gRPC stream to the C-PS for bidirectional communication. This enables streaming metric updates from C-SMA to C-PS, streaming policy updates or queries from C-PS to C-SMA, and efficient binary encoding using Protocol Buffers.</t>
            <t hangText="NETCONF/YANG-Push:">The C-SMA publishes metrics as YANG-modeled data via NETCONF notifications or YANG-Push. This is suitable for deployments that already use NETCONF for network management.</t>
          </list>
        </t>
        <t>The PA MUST support TLS for all northbound connections.</t>
      </section>

      <section title="Distributed Model: Routing Protocol Extensions" anchor="distributed">
        <t>In the distributed model, the C-SMA distributes metrics via routing protocol extensions. The PA supports:</t>
        <t>
          <list style="hanging">
            <t hangText="BGP-LS with CATS Extensions:">The C-SMA injects CATS metrics into BGP-LS as new node or link attributes. The PA maps internal metrics to BGP-LS TLVs: GAS -> CATS-GAS-TLV (TBD), Computing Time -> CATS-COMP-TIME-TLV (TBD), CS-ID -> CATS-CS-ID-TLV (TBD), CSCI-ID -> CATS-CSCI-ID-TLV (TBD).</t>
            <t hangText="GRASP:">The C-SMA uses GRASP to negotiate and distribute CATS metrics among autonomic nodes. The PA maps metrics to GRASP objectives: Objective: "CATS:ServiceMetrics", Payload: CBOR-encoded metric set.</t>
            <t hangText="OSPF/IS-IS TE Extensions:">The C-SMA MAY use IGP TE extensions to carry metrics within the routing domain. This is suitable for deployments where the C-PS is co-located with an Ingress CATS-Forwarder.</t>
          </list>
        </t>
        <t>The PA MUST implement protocol-specific rate limiting and dampening to prevent routing instability.</t>
      </section>

      <section title="Hybrid Model: Combined Approach" anchor="hybrid">
        <t>In the hybrid model, the C-SMA uses a combination of centralized and distributed mechanisms:</t>
        <t>
          <list style="symbols">
            <t>Static/Capability Metrics via Distributed Protocols: Infrequently changing metrics (e.g., maximum capacity, security labels) are distributed via BGP-LS or GRASP.</t>
            <t>Dynamic/Status Metrics via Centralized Interface: Frequently changing metrics (e.g., GAS, Computing Time) are reported via the RESTful or gRPC northbound interface to avoid flooding the routing protocol.</t>
          </list>
        </t>
        <t>The PA MUST ensure consistency between the two channels. If a conflict is detected (e.g., BGP-LS advertises GAS=500 while the REST API reports GAS=400), the more recent update takes precedence.</t>
      </section>
    </section>

    <section title="Policy Enforcement" anchor="policy">
      <t>The Policy Engine (PE) enforces local policies on metric reporting. Policies are expressed as rules with conditions and actions.</t>

      <section title="Local Policy Engine" anchor="policy-engine">
        <t>Rule Format: IF &lt;condition&gt; THEN &lt;action&gt;</t>
        <t>Examples: IF Site_GAS &lt; 100 THEN SET Security_Label = 5; IF SCI_Health = DEGRADED THEN REDUCE SCI_GAS BY 50%; IF Time IN Maintenance_Window THEN SUPPRESS_UPDATES; IF Cost &gt; 100 THEN SET Cost = 100.</t>
        <t>Policies are configured via the CATS Management Plane (e.g., NETCONF, RESTCONF) and stored in a local policy database. The PE evaluates policies in order of priority before metrics are sent to the C-PS.</t>
      </section>

      <section title="Metric Transformation Policies" anchor="transformation">
        <t>The PE applies the following transformation policies:</t>
        <t>
          <list style="hanging">
            <t hangText="Safety Margin:">Reduce reported GAS by a configured percentage to prevent over-subscription. Example: Reported_GAS = Site_GAS * 0.8.</t>
            <t hangText="Ceiling/Floor:">Enforce upper and lower bounds on metrics. Example: Computing Time MUST be &gt;= 1 ms and &lt;= 10000 ms.</t>
            <t hangText="Smoothing:">Apply exponential moving average (EMA) to reduce noise: Smoothed_GAS(t) = alpha * Raw_GAS(t) + (1 - alpha) * Smoothed_GAS(t-1), where alpha is a configurable smoothing factor (default 0.3).</t>
          </list>
        </t>
      </section>

      <section title="Update Control Policies" anchor="update-control">
        <t>The PE controls when updates are sent to the C-PS:</t>
        <t>
          <list style="hanging">
            <t hangText="Threshold Policies:">GAS delta &gt; 10% or absolute delta &gt; 50; Computing Time delta &gt; 20%; Health status change; Security label change.</t>
            <t hangText="Time-Based Policies:">Maximum update interval: force an update at least every 60 seconds (heartbeat); Minimum update interval: suppress updates more frequent than 5 seconds (rate limiting); Maintenance window: suppress all non-critical updates during scheduled maintenance.</t>
            <t hangText="Burst Control:">Token bucket algorithm to limit update rate; Backoff algorithm for repeated failures.</t>
          </list>
        </t>
      </section>
    </section>

    <section title="Security and Trust Management" anchor="security-trust">
      <t>The C-SMA MUST authenticate every SCI before accepting its reports. Supported methods:</t>

      <section title="SCI Authentication" anchor="sci-auth">
        <t>
          <list style="hanging">
            <t hangText="Mutual TLS (mTLS):">The SCI and C-SMA exchange X.509 certificates during connection establishment. The C-SMA validates the SCI's certificate against a trusted CA and checks that the certificate subject matches the expected CSCI-ID.</t>
            <t hangText="Token-Based:">The SCI includes a signed token (e.g., JWT) in each report. The C-SMA validates the token signature, expiration, and issuer.</t>
            <t hangText="IPsec:">For deployments where SCIs and C-SMA communicate over an untrusted network, IPsec MAY be used to protect the entire communication channel.</t>
          </list>
        </t>
        <t>The C-SMA MUST maintain a certificate revocation list (CRL) or support OCSP to check for revoked certificates.</t>
      </section>

      <section title="C-PS Authentication" anchor="cps-auth">
        <t>The C-SMA MUST authenticate the C-PS before sending updates. Supported methods:</t>
        <t>
          <list style="hanging">
            <t hangText="Mutual TLS (mTLS):">The C-SMA validates the C-PS certificate during northbound connection establishment.</t>
            <t hangText="Pre-Shared Key (PSK):">For lightweight deployments, the C-SMA and C-PS MAY use a pre-shared key for message authentication (e.g., HMAC-SHA256).</t>
          </list>
        </t>
        <t>The C-SMA MUST verify that the C-PS is authorized to receive the metrics for the advertised CS-IDs. This MAY be enforced via certificate attributes or policy configuration.</t>
      </section>

      <section title="Metric Integrity and Freshness" anchor="integrity">
        <t>The C-SMA MUST protect the integrity of metric reports:</t>
        <t>
          <list style="hanging">
            <t hangText="Digital Signature:">Each report sent to the C-PS is signed using the C-SMA's private key. The C-PS verifies the signature using the C-SMA's public key.</t>
            <t hangText="Message Authentication Code (MAC):">For deployments using PSK, a MAC (e.g., HMAC-SHA256) is appended to each report.</t>
            <t hangText="Timestamp and Nonce:">Each report includes a timestamp and a monotonically increasing nonce to prevent replay attacks. The C-PS MUST reject reports with timestamps outside a reasonable window (e.g., +/- 30 seconds) or duplicate nonces.</t>
            <t hangText="Freshness Indicator:">The C-SMA includes a freshness indicator (e.g., sequence number or epoch) in each report. The C-PS uses this to detect stale or out-of-order updates.</t>
          </list>
        </t>
      </section>
    </section>

    <section title="Dynamic Synchronization" anchor="sync">
      <t>The Update Controller (UC) sends updates to the C-PS based on triggers and periodic synchronization.</t>

      <section title="Trigger-Based Updates" anchor="trigger-updates">
        <t>The UC sends updates to the C-PS based on the following triggers:</t>
        <t>
          <list style="symbols">
            <t>Metric Change Trigger: When an aggregated metric crosses a configured threshold, the UC sends a delta update.</t>
            <t>Health Change Trigger: When an SCI changes health state (HEALTHY -&gt; DEGRADED, DEGRADED -&gt; UNHEALTHY, etc.), the UC sends an immediate update.</t>
            <t>SCI Discovery Trigger: When a new SCI is discovered or an existing SCI is withdrawn, the UC sends a full update.</t>
            <t>Policy Change Trigger: When a local policy is updated (e.g., new safety margin), the UC re-evaluates all metrics and sends updates as needed.</t>
          </list>
        </t>
        <t>The UC MUST prioritize triggers. Critical triggers (e.g., health change) take precedence over routine triggers (e.g., metric change).</t>
      </section>

      <section title="Periodic Synchronization" anchor="periodic-sync">
        <t>The UC sends periodic updates to maintain soft state:</t>
        <t>
          <list style="hanging">
            <t hangText="Heartbeat:">A full metric snapshot is sent at a fixed interval (e.g., every 60 seconds) even if no triggers have fired. This ensures the C-PS does not age out the C-SMA's entries.</t>
            <t hangText="Refresh:">If the C-PS supports it, the C-SMA MAY use a lightweight refresh message (e.g., keepalive) to extend the C-PS's cache TTL without retransmitting all metrics.</t>
            <t hangText="Synchronization Interval:">The heartbeat interval SHOULD be configurable and MAY be adjusted dynamically based on network conditions or C-PS load.</t>
          </list>
        </t>
      </section>

      <section title="Recovery and Reconciliation" anchor="recovery">
        <t>After a C-PS restart or network partition, the C-SMA and C-PS MUST reconcile their state:</t>
        <t>
          <list style="hanging">
            <t hangText="Full Sync:">The C-SMA sends a complete snapshot of all metrics to the C-PS upon reconnection.</t>
            <t hangText="Incremental Sync:">If the C-PS has persisted some state, the C-SMA MAY send only the changes since the last acknowledged sequence number.</t>
            <t hangText="Reconciliation Protocol:">The C-PS MAY request a full sync by sending a synchronization request to the C-SMA. The C-SMA responds with all current metrics.</t>
            <t hangText="Conflict Resolution:">If the C-PS and C-SMA have divergent state (e.g., due to message loss), the C-SMA's view takes precedence as the authoritative source.</t>
          </list>
        </t>
      </section>
    </section>

    <section title="Failure Handling" anchor="failure">
      <t>The C-SMA detects SCI failures through the following mechanisms:</t>

      <section title="SCI Failure Detection" anchor="sci-failure">
        <t>
          <list style="hanging">
            <t hangText="Missing Reports:">If an SCI fails to send reports within the TTL, the C-SMA marks it as STALE and then FAILED.</t>
            <t hangText="Health Monitor Integration:">The C-SMA MAY integrate with an external health monitor (e.g., the SCI's own health checks or a site-wide monitoring system) to detect failures faster than TTL-based detection.</t>
            <t hangText="Active Probing:">The C-SMA MAY send active probes (e.g., ping, HTTP GET) to unresponsive SCIs to distinguish between SCI failure and network partition.</t>
          </list>
        </t>
        <t>Upon detecting an SCI failure, the C-SMA:</t>
        <t>
          <list style="numbers">
            <t>Sets the SCI's GAS contribution to 0.</t>
            <t>Updates the aggregated site metrics.</t>
            <t>Sends an immediate update to the C-PS.</t>
            <t>Logs the failure for operational analysis.</t>
          </list>
        </t>
      </section>

      <section title="C-PS Unreachability" anchor="cps-failure">
        <t>If the C-SMA cannot reach the C-PS:</t>
        <t>
          <list style="hanging">
            <t hangText="Retry with Backoff:">The C-SMA retries with exponential backoff (e.g., 1s, 2s, 4s, 8s, ... up to a maximum of 60s).</t>
            <t hangText="Buffering:">The C-SMA buffers updates in a local queue. When the C-PS becomes reachable, the buffered updates are sent in batch. The buffer MUST have a maximum size; old updates are dropped when the buffer is full.</t>
            <t hangText="Fallback:">In distributed deployments, the C-SMA MAY fall back to an alternative C-PS or advertise metrics via a routing protocol if the primary C-PS is unreachable.</t>
            <t hangText="Local Action:">The C-SMA MAY notify local operators (e.g., via syslog, SNMP trap) of the C-PS unreachability.</t>
          </list>
        </t>
      </section>

      <section title="Partitioned Operation" anchor="partition">
        <t>During a network partition between the service site and the C-PS:</t>
        <t>
          <list style="hanging">
            <t hangText="Read-Only Mode:">The C-SMA continues to collect and cache metrics from SCIs but stops sending updates to the C-PS.</t>
            <t hangText="Local Steering:">If the C-SMA is co-located with an Egress CATS-Forwarder, it MAY provide local steering decisions using cached metrics until the partition heals.</t>
            <t hangText="Partition Healing:">Upon reconnection, the C-SMA performs a full sync to reconcile state.</t>
          </list>
        </t>
      </section>
    </section>

    <section title="Scalability Considerations" anchor="scalability">
      <t>The C-SMA MUST be designed to scale with the number of SCIs and the frequency of metric updates:</t>
      <t>
        <list style="hanging">
          <t hangText="Horizontal Scaling:">In large service sites, multiple C-SMA instances MAY be deployed, each responsible for a subset of SCIs. A coordinator C-SMA aggregates metrics from the subordinate C-SMAs.</t>
          <t hangText="Metric Compression:">The PA SHOULD compress metric payloads (e.g., using gzip, CBOR, or Protocol Buffers) to reduce bandwidth.</t>
          <t hangText="Update Aggregation:">The UC SHOULD batch multiple SCI updates into a single C-PS advertisement to reduce control-plane overhead.</t>
          <t hangText="Hierarchical Aggregation:">In multi-site deployments, site-level C-SMAs report to a domain-level C-SMA, which aggregates across sites before reporting to the C-PS.</t>
          <t hangText="Selective Reporting:">The PE MAY suppress non-critical metrics (e.g., optional extension metrics) during high-load conditions.</t>
        </list>
      </t>
    </section>

    <section title="Security Considerations" anchor="security">
      <t>The C-SMA is a critical trust anchor in the CATS architecture. Its compromise could lead to traffic misdirection or denial of service. The following security measures are REQUIRED:</t>
      <t>
        <list style="hanging">
          <t hangText="Authentication:">The C-SMA MUST authenticate all SCIs and C-PSes.</t>
          <t hangText="Authorization:">The C-SMA MUST verify that SCIs are authorized to report metrics for their claimed CS-IDs. The C-SMA MUST verify that C-PSes are authorized to receive metrics for the advertised CS-IDs.</t>
          <t hangText="Integrity:">All metric reports MUST be integrity-protected.</t>
          <t hangText="Confidentiality:">Metric reports SHOULD be encrypted to prevent disclosure of internal service topology and capacity.</t>
          <t hangText="Availability:">The C-SMA MUST be resilient to DoS attacks (e.g., excessive SCI reports, replay attacks). Rate limiting, burst control, and input validation are REQUIRED.</t>
          <t hangText="Audit:">The C-SMA MUST log all authentication failures, policy violations, and anomalous metric changes for security audit.</t>
        </list>
      </t>
    </section>

    <section title="IANA Considerations" anchor="iana">
      <t>This document has no IANA actions at this time.</t>
    </section>

  </middle>

  <back>

    <references title="Normative References">
      <reference anchor="RFC2119">
        <front><title>Key words for use in RFCs to Indicate Requirement Levels</title>
        <author initials="S." surname="Bradner" fullname="Scott Bradner"/>
        <date year="1997" month="March"/></front>
        <seriesInfo name="BCP" value="14"/>
        <seriesInfo name="RFC" value="2119"/>
        <format type="TXT" target="https://www.rfc-editor.org/rfc/rfc2119.txt"/>
      </reference>

      <reference anchor="RFC8174">
        <front><title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
        <author initials="B." surname="Leiba" fullname="Barry Leiba"/>
        <date year="2017" month="May"/></front>
        <seriesInfo name="BCP" value="14"/>
        <seriesInfo name="RFC" value="8174"/>
        <format type="TXT" target="https://www.rfc-editor.org/rfc/rfc8174.txt"/>
      </reference>

      <reference anchor="I-D.ietf-cats-framework">
        <front><title>A Framework for Computing-Aware Traffic Steering (CATS)</title>
        <author initials="C." surname="Li" fullname="Cheng Li"/>
        <author initials="Z." surname="Du" fullname="Zongpeng Du"/>
        <author initials="M." surname="Boucadair" fullname="Mohamed Boucadair"/>
        <date year="2026" month="March"/></front>
        <seriesInfo name="Internet-Draft" value="draft-ietf-cats-framework-22"/>
        <format type="TXT" target="https://www.ietf.org/archive/id/draft-ietf-cats-framework-22.txt"/>
      </reference>

      <reference anchor="I-D.zhangb-cats-service-metrics-op">
        <front><title>Computing Service Metric Definitions and Operation under CATS</title>
        <author initials="B." surname="Zhang" fullname="Bin Zhang"/>
        <author initials="Y." surname="Dai" fullname="Yina Dai"/>
        <author initials="Z." surname="Du" fullname="Zongpeng Du"/>
        <date year="2026" month="July"/></front>
        <seriesInfo name="Internet-Draft" value="draft-zhangb-cats-service-metrics-op-03"/>
        <format type="TXT" target="https://www.ietf.org/archive/id/draft-zhangb-cats-service-metrics-op-03.txt"/>
      </reference>

      <reference anchor="RFC6241">
        <front><title>Network Configuration Protocol (NETCONF)</title>
        <author initials="R." surname="Enns" fullname="Rob Enns"/>
        <author initials="M." surname="Bjorklund" fullname="Martin Bjorklund"/>
        <author initials="J." surname="Schoenwaelder" fullname="Juergen Schoenwaelder"/>
        <date year="2011" month="June"/></front>
        <seriesInfo name="RFC" value="6241"/>
        <format type="TXT" target="https://www.rfc-editor.org/rfc/rfc6241.txt"/>
      </reference>

      <reference anchor="RFC8639">
        <front><title>Subscription to YANG Notifications</title>
        <author initials="E." surname="Voit" fullname="Eric Voit"/>
        <author initials="A." surname="Clemm" fullname="Alexander Clemm"/>
        <author initials="A." surname="Gonzalez Prieto" fullname="Alberto Gonzalez Prieto"/>
        <date year="2019" month="September"/></front>
        <seriesInfo name="RFC" value="8639"/>
        <format type="TXT" target="https://www.rfc-editor.org/rfc/rfc8639.txt"/>
      </reference>

      <reference anchor="RFC7471">
        <front><title>OSPF Traffic Engineering (TE) Metric Extensions</title>
        <author initials="S." surname="Giacalone" fullname="Spencer Giacalone"/>
        <author initials="D." surname="Ward" fullname="David Ward"/>
        <author initials="J." surname="Drake" fullname="John Drake"/>
        <date year="2015" month="March"/></front>
        <seriesInfo name="RFC" value="7471"/>
        <format type="TXT" target="https://www.rfc-editor.org/rfc/rfc7471.txt"/>
      </reference>

      <reference anchor="RFC8570">
        <front><title>IS-IS Traffic Engineering (TE) Metric Extensions</title>
        <author initials="L." surname="Ginsberg" fullname="Les Ginsberg"/>
        <author initials="S." surname="Previdi" fullname="Stefano Previdi"/>
        <author initials="S." surname="Giacalone" fullname="Spencer Giacalone"/>
        <date year="2019" month="March"/></front>
        <seriesInfo name="RFC" value="8570"/>
        <format type="TXT" target="https://www.rfc-editor.org/rfc/rfc8570.txt"/>
      </reference>

      <reference anchor="RFC8571">
        <front><title>BGP - Link State (BGP-LS) Advertisement of IGP Traffic Engineering Performance Metric Extensions</title>
        <author initials="L." surname="Ginsberg" fullname="Les Ginsberg"/>
        <author initials="S." surname="Previdi" fullname="Stefano Previdi"/>
        <author initials="Q." surname="Wu" fullname="Qin Wu"/>
        <date year="2019" month="March"/></front>
        <seriesInfo name="RFC" value="8571"/>
        <format type="TXT" target="https://www.rfc-editor.org/rfc/rfc8571.txt"/>
      </reference>

      <reference anchor="RFC8990">
        <front><title>GeneRic Autonomic Signaling Protocol (GRASP)</title>
        <author initials="C." surname="Bormann" fullname="Carsten Bormann"/>
        <author initials="B." surname="Carpenter" fullname="Brian Carpenter"/>
        <author initials="B." surname="Liu" fullname="Bing Liu"/>
        <date year="2021" month="March"/></front>
        <seriesInfo name="RFC" value="8990"/>
        <format type="TXT" target="https://www.rfc-editor.org/rfc/rfc8990.txt"/>
      </reference>
    </references>

    <references title="Informative References">
      <reference anchor="I-D.zhangb-cats-cmas">
        <front><title>Public Service Platform for Computing-Aware Traffic Steering (CATS)</title>
        <author initials="B." surname="Zhang" fullname="Bin Zhang"/>
        <author initials="Y." surname="Dai" fullname="Yina Dai"/>
        <author initials="Z." surname="Du" fullname="Zongpeng Du"/>
        <date year="2026" month="May"/></front>
        <seriesInfo name="Internet-Draft" value="draft-zhangb-cats-cmas-04"/>
        <format type="TXT" target="https://www.ietf.org/archive/id/draft-zhangb-cats-cmas-04.txt"/>
      </reference>

      <reference anchor="I-D.ietf-cats-metric-definition">
        <front><title>CATS Metrics Definition</title>
        <author initials="Y." surname="Kehan" fullname="Yao Kehan"/>
        <author initials="C." surname="Li" fullname="Cheng Li"/>
        <date year="2026" month="June"/></front>
        <seriesInfo name="Internet-Draft" value="draft-ietf-cats-metric-definition-10"/>
        <format type="TXT" target="https://www.ietf.org/archive/id/draft-ietf-cats-metric-definition-10.txt"/>
      </reference>

      <reference anchor="RFC4760">
        <front><title>Multiprotocol Extensions for BGP-4</title>
        <author initials="T." surname="Bates" fullname="Tony Bates"/>
        <author initials="R." surname="Chandra" fullname="Ravi Chandra"/>
        <author initials="D." surname="Katz" fullname="Dave Katz"/>
        <date year="2007" month="January"/></front>
        <seriesInfo name="RFC" value="4760"/>
        <format type="TXT" target="https://www.rfc-editor.org/rfc/rfc4760.txt"/>
      </reference>

      <reference anchor="RFC7149">
        <front><title>Software-Defined Networking: A Perspective from within a Service Provider Environment</title>
        <author initials="M." surname="Boucadair" fullname="Mohamed Boucadair"/>
        <author initials="C." surname="Jacquenet" fullname="Christian Jacquenet"/>
        <date year="2014" month="March"/></front>
        <seriesInfo name="RFC" value="7149"/>
        <format type="TXT" target="https://www.rfc-editor.org/rfc/rfc7149.txt"/>
      </reference>

      <reference anchor="RFC7426">
        <front><title>Software-Defined Networking (SDN): Layers and Architecture Terminology</title>
        <author initials="E." surname="Haleplidis" fullname="Evangelos Haleplidis"/>
        <author initials="K." surname="Pentikousis" fullname="Kostas Pentikousis"/>
        <author initials="S." surname="Denazis" fullname="Spyros Denazis"/>
        <date year="2015" month="January"/></front>
        <seriesInfo name="RFC" value="7426"/>
        <format type="TXT" target="https://www.rfc-editor.org/rfc/rfc7426.txt"/>
      </reference>
    </references>

    <section title="Acknowledgments" anchor="ack">
      <t>The authors thank the CATS working group for their valuable feedback and contributions to this document.</t>
    </section>

  </back>

</rfc>
