nvcf / function-autoscaler
AGENTS.md261 starsChanged 9 days agoApache-2.0View on GitHub
The cargo run above has the same Bazel-only dependency described under Build & Test, so it does not resolve either. Run the :server Bazel target instead. crates/server depends on //src/libraries/rust/nvcf-info as a Bazel target only, and cargo does not declare it, so cargo build, cargo clippy, and cargo test fail to resolve it. Build and test with Bazel from the monorepo root: Formatting and advisory checks do not compile the crate, so they still run under cargo: CI subproject id:…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,700 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository133 other files it gives its agents.
- AGENTS.mdAGENTS.md
- ai-tooling/AGENTS.mdAGENTS.md
- deploy/helm/cassandra/AGENTS.mdAGENTS.md
- deploy/helm/cert-manager/AGENTS.mdAGENTS.md
- deploy/helm/cloud-functions/AGENTS.mdAGENTS.md
- deploy/helm/cloud-tasks/AGENTS.mdAGENTS.md
- deploy/helm/encrypted-secret-store/AGENTS.mdAGENTS.md
- deploy/helm/icms/AGENTS.mdAGENTS.md
- deploy/helm/llm-request-router/AGENTS.mdAGENTS.md
- deploy/helm/nats/AGENTS.mdAGENTS.md
- deploy/helm/notary/AGENTS.mdAGENTS.md
- deploy/helm/nvcf-pki/AGENTS.mdAGENTS.md
- deploy/helm/openbao/AGENTS.mdAGENTS.md
- deploy/helm/vanity-gateway/AGENTS.mdAGENTS.md
- deploy/releases/AGENTS.mdAGENTS.md
- deploy/stacks/AGENTS.mdAGENTS.md
- deploy/stacks/observability/AGENTS.mdAGENTS.md
- deploy/stacks/stargate-dev/AGENTS.mdAGENTS.md
- deploy/stacks/stargate-dev/benchmark/AGENTS.mdAGENTS.md
- docs/AGENTS.mdAGENTS.md
- docs/overview/samples/scripts/AGENTS.mdAGENTS.md
- examples/AGENTS.mdAGENTS.md
- infra/cassandra/AGENTS.mdAGENTS.md
- infra/openbao/AGENTS.mdAGENTS.md
- infra/openbao/plugins/vault-plugin-secrets-jwt/AGENTS.mdAGENTS.md
- infra/openbao/tests/AGENTS.mdAGENTS.md
- migrations/cassandra/AGENTS.mdAGENTS.md
- migrations/openbao/AGENTS.mdAGENTS.md
- src/compute-plane-services/byoo-otel-collector/AGENTS.mdAGENTS.md
- src/compute-plane-services/ess-agent/AGENTS.mdAGENTS.md
- src/compute-plane-services/image-credential-helper/AGENTS.mdAGENTS.md
- src/compute-plane-services/nvca/AGENTS.mdAGENTS.md
- src/compute-plane-services/nvsnap/docs/AGENTS.mdAGENTS.md
- src/compute-plane-services/nvstor/AGENTS.mdAGENTS.md
- src/compute-plane-services/request-trace-uploader/AGENTS.mdAGENTS.md
- src/control-plane-services/admin-token-issuer-proxy/AGENTS.mdAGENTS.md
- src/control-plane-services/api-keys/AGENTS.mdAGENTS.md
- src/control-plane-services/cloud-functions/AGENTS.mdAGENTS.md
- src/control-plane-services/cloud-tasks/AGENTS.mdAGENTS.md
- src/control-plane-services/encrypted-secret-store/AGENTS.mdAGENTS.md
- src/control-plane-services/function-autoscaler/local_env/AGENTS.mdAGENTS.md
- src/control-plane-services/instance-cluster-management/AGENTS.mdAGENTS.md
- src/control-plane-services/nats-auth-callout/AGENTS.mdAGENTS.md
- src/control-plane-services/notary/AGENTS.mdAGENTS.md
- src/invocation-plane-services/grpc-proxy/AGENTS.mdAGENTS.md
- src/invocation-plane-services/http-invocation/AGENTS.mdAGENTS.md
- src/invocation-plane-services/llm-api-gateway/AGENTS.mdAGENTS.md
- src/invocation-plane-services/ratelimiter/AGENTS.mdAGENTS.md
- src/invocation-plane-services/vanity-gateway/AGENTS.mdAGENTS.md
- src/libraries/go/lib/AGENTS.mdAGENTS.md
- src/libraries/go/worker/AGENTS.mdAGENTS.md
- src/libraries/java/nv-boot-parent/AGENTS.mdAGENTS.md
- src/libraries/python/nv-cloud-function-helpers/AGENTS.mdAGENTS.md
- src/libraries/rust/nvcf-info/AGENTS.mdAGENTS.md
- src/libraries/rust/stargate/AGENTS.mdAGENTS.md
- src/uis/nvcf-ui/AGENTS.mdAGENTS.md
- src/uis/nvcf-ui/helm/AGENTS.mdAGENTS.md
- tests/bdd/AGENTS.mdAGENTS.md
- tools/AGENTS.mdAGENTS.md
- tools/docs-version-sync/AGENTS.mdAGENTS.md
- The first 60 shown.
The file
We split this AGENTS.md into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 27
All operational parameters are externalized to YAML settings files with #[serde(default)].
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md
Repo Role
- Repo:
rs-autoscaler - Language: Rust
- Purpose: Autoscaling service for NVCF monitors function utilization via a timeseries database and adjusts instance counts through the NVCF API.
Architecture
- Scaling loop: Queries utilization metrics, applies per-function scaling policies (static or custom via gRPC), decides desired instance count.
- Discovery: Finds active functions from the timeseries DB (invocations + workers), writes them to Cassandra.
- Policy cache: Fetches per-function scaling configs from a gRPC service, caches with configurable TTL.
- Distributed locking: Cassandra-based locks for coordinating discovery and scaling across replicas.
Key Paths
crates/server/src/scaling/: scaling logic, policy client/cache, thresholds, stickinesscrates/server/src/work/: scaling loop, discovery, utilization queriescrates/server/src/cassandra/: Cassandra client, statements, distributed lockscrates/server/src/timeseries_db/: timeseries DB client (Thanos/VictoriaMetrics compatible)crates/server/src/nvcf_api/: NVCF API client, OAuth2 token clientcrates/server/resources/: YAML config files per environment
Config
- All operational parameters are externalized to YAML settings files with
#[serde(default)]. - Environment variable overrides use
__as separator (e.g.,SCALING__UTILIZATION_WINDOW_SECONDS=70). - Secrets are loaded from a JSON file at the path specified by
secrets_pathin config.
Local Development
# Start dependencies
docker compose -f crates/server/nvcf-service/local_env/docker-compose.yml up -d cassandra victoriametrics
# Copy and fill secrets
cp local_env/secrets/secrets.json.tmpl local_env/vault/secrets.json
# Run with local config
CONFIG=crates/server/resources/settings-local.yaml \
SECRETS_PATH=local_env/vault/secrets.json \
cargo run --bin server -p rs-autoscalerThe cargo run above has the same Bazel-only dependency described under Build
& Test, so it does not resolve either. Run the :server Bazel target instead.
Build & Test
crates/server depends on //src/libraries/rust/nvcf-info as a Bazel target
only, and cargo does not declare it, so cargo build, cargo clippy, and
cargo test fail to resolve it. Build and test with Bazel from the monorepo
root:
bazel test //src/control-plane-services/function-autoscaler/crates/server:allFormatting and advisory checks do not compile the crate, so they still run under cargo:
cargo fmt -p rs-autoscaler
cargo deny check advisoriesCI subproject id: function-autoscaler. Follow the root RELEASE.md and
docs/dev/github-release-process.md for source versioning and publication
handoffs. Inspect .github/workflows/ for current public validation.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

