NativeLink
Reference

Configuration reference

Every knob in the NativeLink JSON5 configuration — types, defaults, links to source.

This page is the canonical configuration reference. It is autogenerated from the Rust source in nativelink-config/ so that the published reference can never drift from what the binary accepts.

Top-level fields

{
  // Global configuration applied to every component.
  global: { /* ... */ },

  // Named storage backends. Referenced by name from servers and workers.
  stores: [ /* StoreConfig[] */ ],

  // gRPC + HTTP listeners and the RE-API services they expose.
  servers: [ /* ServerConfig[] */ ],

  // Schedulers — only required on nodes that accept Execute() calls.
  schedulers: { /* map<name, SchedulerConfig> */ },

  // Workers — only required on nodes that run actions.
  workers: [ /* WorkerConfig[] */ ],
}

Global

global: {
  // Maximum size of a single RE-API gRPC message. Default 4 MiB.
  max_grpc_message_size: 4_194_304,

  // Default instance name when a client doesn't specify one.
  default_digest_hash_function: "sha256",

  // Prometheus metrics endpoint.
  metrics: { prometheus: { listen_address: "0.0.0.0:9090" } },

  // OpenTelemetry tracing endpoint.
  tracing: {
    otlp: { endpoint: "http://otel-collector:4317" },
    sample_rate: 0.05,
  },
}

Store backends

The full list of StoreConfig shapes:

  • memory
  • filesystem
  • experimental_s3_store
  • redis_store
  • compression
  • dedup
  • fast_slow
  • shard
  • size_partitioning
  • verify
  • noop
  • ref_store

See Configuration → Basic and → Production for runnable examples of each.

Servers

ServerConfig carries the listener, optional TLS, and the set of services exposed:

{
  name: "main_server",
  listener: {
    http: {
      socket_address: "0.0.0.0:50051",
      tls: { /* optional */ },
      advanced_http: { http2_keep_alive_interval: 10 },
    },
  },
  services: {
    cas:          [{ instance_name, cas_store }],
    ac:           [{ instance_name, ac_store, read_only? }],
    bytestream:   [{ instance_name, cas_store, max_bytes_per_stream? }],
    capabilities: [{ instance_name, remote_execution? }],
    execution:    [{ instance_name, scheduler }],
    worker_api:   { scheduler },
  },
}

Schedulers

{
  simple: {
    supported_platform_properties: {
      OSFamily:        "exact",
      container_image: "exact",
      cpu_count:       "minimum",
      // priority: "exact",
    },
    max_job_retries:  3,
    worker_timeout_s: 300,
  },
}

Match modes:

  • "exact" — action property and worker property must match exactly.
  • "minimum" — worker property must be >= action property.
  • "priority" — action gets routed to the highest-property worker available.

Workers

{
  local: {
    worker_api_endpoint: { uri: "grpc://scheduler:50051", timeout: 10 },
    cas_fast_slow_store: "CAS_MAIN_STORE",
    upload_action_result: {
      upload_action_result: { ac_store: "AC_MAIN_STORE" },
    },
    max_action_timeout: 3600,
    platform_properties: {
      OSFamily:        { values: ["linux"] },
      container_image: { query_cmd: "echo nativelink" },
    },
    persistent_workers: {
      max_workers_per_pool: 8,
      idle_timeout_s: 600,
      protocols: ["proto", "json"],
    },
  },
}

Reading the source

The exhaustive definitions live in:

If the source disagrees with this page, the source wins. Open an issue and we'll fix the docs.