Overview
The S3 store (configured asexperimental_cloud_object_store) provides cloud-based persistent storage using Amazon S3, Google Cloud Storage (GCS), or S3-compatible services like NetApp ONTAP. This store enables data sharing across multiple NativeLink instances and provides virtually unlimited storage capacity.
Supported Backends
Amazon S3
Uses Amazon’s S3 service with system certificates for TLS verification viarustls-platform-verifier.
Google Cloud Storage (GCS)
Uses Google’s Cloud Storage service as an S3-compatible backend.NetApp ONTAP S3
S3-compatible storage specifically configured for ONTAP’s requirements including custom TLS configuration and credentials management.Use Cases
- Distributed deployments: Share cache and artifacts across multiple NativeLink instances
- Unlimited storage: Scale beyond local disk constraints
- Durable archival: Long-term persistent storage of build artifacts
- Multi-region deployments: Access cache from different geographic locations
- Hybrid architectures: Cloud-backed slow tier with local fast tier
Performance Characteristics
- Read performance: Network latency dependent (typically 50-200ms first byte)
- Write performance: Supports multipart uploads for large objects
- Durability: Extremely high (11 nines for S3)
- Availability: High (99.9%+ for most S3 regions)
- Cost: Pay per GB stored and transferred
Common Configuration
All cloud object store backends share these common configuration options:Optional prefix to prepend to all object keys in the bucket. Useful for:
- Organizing data within a shared bucket
- Separating different environments (dev, staging, prod)
- Multi-tenant configurations
"test-prefix-index/"Retry configuration for network request failures.See Retry Configuration for details.
If the number of seconds since the
last_modified time of the object is greater than this value, the object will not be considered “existing”.This allows external tools to delete old objects. If a client receives a NotFound, it should re-upload the object.Important: Provide sufficient buffer time between this value and your external cleanup tool’s expiration configuration.Default: 0 (never consider objects expired)The maximum buffer size (in bytes) to retain in case of a retryable error during upload.Setting this to zero disables upload buffering, meaning any failure during upload will abort the entire upload and the client will likely receive an error.Default: 5MB (5242880 bytes)
Maximum number of concurrent
UploadPart requests per MultipartUpload.Higher values can improve upload throughput for large objects but increase memory usage.Default: 10Allow unencrypted HTTP connections.Only use this for local testing. Never enable in production.Default: false
Disable HTTP/2 connections and only use HTTP/1.1.The default client configuration has both HTTP/1.1 and HTTP/2 enabled. Disable HTTP/2 if your environment has poor support or performance issues with HTTP/2.Default: false
AWS S3 Configuration
Set to
"aws" for Amazon S3.AWS region for the S3 bucket.Examples:
"us-east-1", "us-west-2", "eu-north-1", "af-south-1"S3 bucket name to use as the backend.
AWS S3 Example
Google Cloud Storage Configuration
Set to
"gcs" for Google Cloud Storage.GCS bucket name to use as the backend.
Chunk size for resumable uploads in bytes.Default: 2MB (2097152 bytes)
Error if authentication was not found.Default: false
Connection timeout in milliseconds.Default: 3000ms (3 seconds)
Read timeout in milliseconds.Default: 3000ms (3 seconds)
GCS Example
NetApp ONTAP S3 Configuration
Set to
"ontap" for NetApp ONTAP S3.The ONTAP S3 endpoint URL.Example:
"https://ontap-s3-endpoint:443"The ONTAP vserver name.
Bucket name in the ONTAP S3 storage.
Path to the root certificates file for TLS verification.Optional - if not provided, system certificates will be used.
ONTAP Credentials
ONTAP S3 uses AWS environment variables for credentials:AWS_ACCESS_KEY_IDAWS_SECRET_ACCESS_KEYAWS_DEFAULT_REGION
ONTAP Example
Retry Configuration
Retry configuration uses exponential backoff with jitter. Each iteration applies a jitter as a percentage of the calculated delay.Maximum number of retries until retrying stops.Setting this to zero will attempt once but not retry.Default: 0 (attempt once, no retries)
Delay in seconds for exponential backoff.The actual delay for attempt N is:
(2 ^ N) * delay * (1 ± jitter/2)Default: 0Amount of jitter to add as a percentage in decimal form (0.0 to 1.0).This randomizes delays to prevent thundering herd problems.Example: 0.5 means ±25% jitterDefault: 0
Retry Example Timing
Withmax_retries: 7, delay: 0.1, jitter: 0.5:
| Attempt | Delay Range |
|---|---|
| 1 | 0ms |
| 2 | 75ms - 125ms |
| 3 | 150ms - 250ms |
| 4 | 300ms - 500ms |
| 5 | 600ms - 1s |
| 6 | 1.2s - 2s |
| 7 | 2.4s - 4s |
| 8 | 4.8s - 8s |
Multipart Upload Details
Constraints
- Minimum part size: 5MB (except last part)
- Maximum part size: 5GB
- Maximum parts per upload: 10,000
Upload Strategy
The store automatically uses multipart uploads for large objects:- Initiates multipart upload
- Uploads parts concurrently (up to
multipart_max_concurrent_uploads) - Completes multipart upload
- Falls back to simple upload on errors if data is buffered
Best Practices
Monitor costs: Track S3 usage (storage, requests, and data transfer) to avoid unexpected costs. Consider S3 Intelligent-Tiering for cost optimization.