| Files | Last commit | Last update |
|---|---|---|
atenet-router: add safe actor assignments caching and retry logic (#2420) Every ingress request calls `ext_proc` in `atenet-router`, which calls `ResumeActor` on the ATE API server to find the actor's worker. This adds an Envoy Rust dynamic module (`envoy_substrate_ingress_cache`) that caches `<atespace>/<actor> -> worker IP` in Envoy, so bodiless requests to a warm actor skip that call. It's behind the `IngressCache` preview gate, off by default. - **Cache hit**: the HTTP filter, ahead of `ext_proc`, reads the actor from `dev.ate.target.actor` filter state or a single `ate-target-actor` header (an inner header on a terminated CONNECT tunnel is ignored). It sets the `envoy.filters.listener.original_dst` metadata (worker `ip:atunnel_port`, actor port, worker SPIFFE ID), `x-ate-target-port` and `ate-target-actor`, plus `ate.ingress_cache` `hit` dynamic metadata, and clears the route cache. A dedicated route that matches that metadata, which clients can't set, has `ext_proc` disabled. - **Cache miss**: the request goes through `ext_proc` unchanged. On a successful response the filter learns the binding from the `original_dst` metadata. Failures aren't learned. - **Requests with a body**: only requests that end with their headers or have `content-length: 0` use the cache, because Envoy doesn't buffer bodies for replay. Everything else, including all gRPC, chunked or HTTP/2 GETs and upgrades, skips the lookup (`bypass`). Their responses still refresh the cache if successful. - **Eviction**: a hit that fails with `421` + `x-ate-assignment-stale: true`, `503` with `UF`/`UH`/`UC`/`UR` (Envoy flags), or `grpc-status: 14` evicts the binding it used, but not a newer one. Application 503s without flags are left alone. - **Tunnel Watcher**: on the CONNECT path a refused tunnel (never established) and a tunnel cut off mid-request looks the same to the router (`503 UC`). The `tunnel_watcher` is a network filter on the `actor_connect` internal listener, before `tcp_proxy`, that can them apart from byte direction alone. A close with `UF` marks the actor's entries for that worker **stale**; an mid-flight close with a request outstanding marks them **spoiled**. Its close callback runs inside `tcp_proxy`'s close, so the mark always lands before the router's `503`. - **Replay**: requests with no body that hit stale cache are replayed through `ext_proc` with `recreate_stream` (restoring `ate-target-actor`; the new stream starts without the hit metadata) only when we have **certainty** an actor did NOT receive it: `421` stale, `503` `UF`/`UH`, or `503 UC` with `upstream_reset_before_response_started` details AND only when the cache entry is **stale and not spoiled**. Replay of requests with body, including all gRPC is left out of scope of this initial implementation. - As of this implementation, the cache is **per Envoy worker thread** (no locks). It can be configured with `atenet-router`'s `--ingress-cache-ttl` (default 5s) and `--ingress-cache-max-cached-actors` (default 10,000 per thread) set its TTL and size. Known limitations are in the module README. On kind with the router at 2 CPUs and 50 actors, the cache raised the max RPS within a 25ms tail-latency SLO from 3936 to 3968, cut p50 from 3.77ms to 1.03ms, and cut `ext_proc` calls by ~96%. AI was used to assist with the development of this change: including knowledge gathering, adversarial testing and review, test coverage writing, refactoring, and all code writing. Line by line read of all deltas by the human author (except for autogenerated vendor/ dir), as well as benchmark and test results review. - [x] Tests pass - [x] Appropriate changes to documentation are included in the PR --------- Signed-off-by: Pancho <panchoruy@google.com> | 9 days ago | |
Update Copyright for CNCF. All Code was donated, accept only "The Agent Substrate Authors" going forward (#3644) <!-- The PR title becomes the release note. Write it for users. --> Why is this needed? (Or link the issue. Open one first for features, API, install or CI changes.) This project was donated to the CNCF sandbox, for some time now we've accepted either Google LLC or The Agent Substrate Authors. Consolidate on the latter, and stop accepting new files with the former. <!-- e.g. "AI-assisted, I reviewed and tested it." No AI co-author trailers. --> AI use: .... technically to help vet the bash command, but this is a mechanical change. The bash fu is included in the commit message. <!-- Breaking change? Describe what users must do on upgrade and ask for the `breaking-change` label. --> - [x] Tests pass - [x] Docs updated --------- Signed-off-by: Benjamin Elder <bentheelder@google.com> | 22 days ago | |
Update Copyright for CNCF. All Code was donated, accept only "The Agent Substrate Authors" going forward (#3644) <!-- The PR title becomes the release note. Write it for users. --> Why is this needed? (Or link the issue. Open one first for features, API, install or CI changes.) This project was donated to the CNCF sandbox, for some time now we've accepted either Google LLC or The Agent Substrate Authors. Consolidate on the latter, and stop accepting new files with the former. <!-- e.g. "AI-assisted, I reviewed and tested it." No AI co-author trailers. --> AI use: .... technically to help vet the bash command, but this is a mechanical change. The bash fu is included in the commit message. <!-- Breaking change? Describe what users must do on upgrade and ask for the `breaking-change` label. --> - [x] Tests pass - [x] Docs updated --------- Signed-off-by: Benjamin Elder <bentheelder@google.com> | 22 days ago | |
Update Copyright for CNCF. All Code was donated, accept only "The Agent Substrate Authors" going forward (#3644) <!-- The PR title becomes the release note. Write it for users. --> Why is this needed? (Or link the issue. Open one first for features, API, install or CI changes.) This project was donated to the CNCF sandbox, for some time now we've accepted either Google LLC or The Agent Substrate Authors. Consolidate on the latter, and stop accepting new files with the former. <!-- e.g. "AI-assisted, I reviewed and tested it." No AI co-author trailers. --> AI use: .... technically to help vet the bash command, but this is a mechanical change. The bash fu is included in the commit message. <!-- Breaking change? Describe what users must do on upgrade and ask for the `breaking-change` label. --> - [x] Tests pass - [x] Docs updated --------- Signed-off-by: Benjamin Elder <bentheelder@google.com> | 22 days ago | |
Update Copyright for CNCF. All Code was donated, accept only "The Agent Substrate Authors" going forward (#3644) <!-- The PR title becomes the release note. Write it for users. --> Why is this needed? (Or link the issue. Open one first for features, API, install or CI changes.) This project was donated to the CNCF sandbox, for some time now we've accepted either Google LLC or The Agent Substrate Authors. Consolidate on the latter, and stop accepting new files with the former. <!-- e.g. "AI-assisted, I reviewed and tested it." No AI co-author trailers. --> AI use: .... technically to help vet the bash command, but this is a mechanical change. The bash fu is included in the commit message. <!-- Breaking change? Describe what users must do on upgrade and ask for the `breaking-change` label. --> - [x] Tests pass - [x] Docs updated --------- Signed-off-by: Benjamin Elder <bentheelder@google.com> | 22 days ago |
| Files | Last commit | Last update |
|---|---|---|
| 9 days ago | ||
| 22 days ago | ||
| 22 days ago | ||
| 22 days ago | ||
| 22 days ago |