AIS Buckets: Design and Operations
AIS Buckets: Design and Operations
A bucket is a named container for objects - monolithic files or chunked representations - with associated metadata.
Buckets are the primary unit of data organization and policy application in AIStore (AIS).
Object metadata includes checksum, version, size, access time, replica/EC placement, unique bucket ID (
BID), and custom user-defined attributes. For remote buckets, AIS may also store backend-specific metadata such as ETag, LastModified timestamps, backend version identifiers, and provider checksums when available.Metadata v2 includes additional flags used by AIS features (for example, chunked object representation).
AIS uses a flat hierarchy: bucket-name/object-name key space. It supports virtual directories through prefix-based naming with recursive and non-recursive operations.
This document is organized in two parts:
- Part I: Design - covers the bucket abstraction, identity model, namespaces, remote clusters, and backend buckets
- Part II: How-To - practical operations: working with same-name buckets, prefetch/evict, access control, provider configuration, and CLI reference
Part I: Design
AIS does not treat a bucket as a passive container. A bucket is a logical namespace that AIS materializes lazily (for remote backends), configures dynamically, and manages cluster-wide.
Table of Contents
- Motivation
- The Bucket
- Bucket Lifecycle
- Namespaces
- Remote AIS Clusters
- Backend Buckets
- System Buckets
Motivation
The idea is to provide a unified storage abstraction. Instead of maintaining different APIs for in-cluster storage, Cloud providers, other remote backends - AIS exposes everything through a single, consistent bucket abstraction.
The design goals were (and remain):
- Operational Simplicity: Eliminate “registration overhead.” If a bucket exists in the backend, it should be immediately usable in AIS.
- Provider Agnostic: The API remains identical whether the data resides on local NVMe drives, a remote AIS cluster, or a public cloud provider.
- Dynamic Configuration: Buckets are not passive containers; they are logical namespaces where data protection (EC, Mirroring) and caching policies (LRU) are applied dynamically.
Users interact with buckets uniformly, regardless of where they live:
- Local disks (AIS provider)
- AWS, GCP, Azure, OCI
- S3-compatible systems (SwiftStack, Cloudian, MinIO, Oracle OCI, etc.)
- Other AIS clusters
The provider and namespace differentiate the backend; the API stays the same.
Creation
Another core design goal was to eliminate boilerplate: if a bucket exists in the remote backend (Cloud, Remote AIS, etc.) and is accessible, AIS makes it immediately usable. Remote buckets are added lazily, on first reference, without a separate creation step.
Explicit creation is supported when additional control is required - credentials, endpoints, namespaces, or properties that must be set before first access.
Further details - in section Bucket Lifecycle below.
Bucket Identity
Once added to BMD, a bucket’s identity becomes cluster-wide and immutable:
Identity = Provider + Namespace + Name
AIS never guesses or rewrites identity. s3://#ns1/bucket and s3://#ns2/bucket are distinct buckets.
The Bucket
Example: S3 bucket with namespace
Example: AIS bucket with backend
Bucket Name
Bucket names are limited to 64 bytes and may contain only letters, digits, dashes (-), underscores (_), and single dots (.). Consecutive dots (..) are not allowed.
Names that start with . are reserved for system buckets. User-defined buckets therefore cannot use a leading dot, and any unrecognized .-prefixed name is rejected.
Provider
Indicates the storage backend:
Remote AIS clusters use the ais provider with a namespace referencing the cluster alias or UUID:
Namespace
Namespaces disambiguate buckets that share the same name.
Originally, all cloud buckets had an implicit global namespace. That model breaks when:
- Different AWS accounts contain same-name buckets
- S3-compatible endpoints host same-name buckets
- SwiftStack/Cloudian accounts scope buckets by user
Namespaces fix this:
These resolve to:
They are independent in every way - separate BMD entries, credentials, and on-disk paths.
Note: The
Nsstruct has two fields: UUID (for remote AIS clusters) and Name (for logical namespaces). For cloud buckets, namespace identifier (e.g., #prod in s3://#prod/bucket) enables multiple same-name buckets with different credentials or endpoints.
For remote AIS clusters, the namespace additionally carries the cluster’s UUID:
Note: The bucket namespace you choose - whether it represents an AWS profile, a GCS account, or simply a human-readable alias - becomes part of the bucket’s physical on-disk path. What starts as a logical identifier materializes into on-disk naming structure.
Bucket Properties
Bucket properties - stored in BMD, inherited from cluster config, overridable per-bucket - control data protection (checksums, EC, mirroring), chunked representation, versioning and synchronization with remote sources, LRU eviction, rate limiting, access permissions, provider-specific settings, and more.
The properties:
- are inherited from cluster-wide configuration at bucket creation time;
- can be overridden at creation time and/or at any time via
ais bucket props setor the corresponding Go or Python API; - are applied cluster-wide via metasync;
- include data layout, checksumming, EC/mirroring, LRU, rate limiting, backend linkage, access control, and more.
At the top level:
Feature Flags
Feature flags are a 64-bit bitmask controlling assorted runtime behaviors. Most flags are cluster-wide, but a subset can be configured per-bucket.
Bucket-level flags
For the full list, see this separate Feature Flags document.
Tag meanings
integrity+- enhances data safetyintegrity-- trades safety for performanceperf- performance optimizationoverhead- may impact performances3,compat- S3 compatibility
Setting bucket features
Some flags are mutually exclusive. For example,
Disable-Cold-GETandStreaming-Cold-GETcannot both be set - the system will reject the configuration. For complete details on all feature flags (cluster-wide and bucket-level), see Feature Flags.
Bucket Lifecycle
The distinction between implicit bucket discovery and explicit creation is best summarized by the AIS CLI itself.
When you run ais create --help, it outlines the specific scenarios where ‘on-the-fly’ discovery isn’t enough:
Implicit creation (lazy discovery)
On first reference:
AIS:
- Parses the bucket URI into internal control structure (
cmn.Bck) - Checks BMD for existing entry
- If missing: performs
HEAD(bucket)to validate access - Inserts the bucket into BMD with default properties
- Metasyncs the latter to all nodes
This behavior is foundational, motivated by removing the operational overhead of bucket management.
Explicit creation
Invoked with:
AIS:
- Parses URI and properties
- Issues
HEAD(unless--skip-lookupor bucket already in BMD) - Creates BMD entry with specified properties
- Metasyncs to all nodes
Use --skip-lookup when default credentials cannot access the bucket:
Deletion and eviction
AIS buckets:
Destroys the bucket and all objects permanently.
Cloud buckets:
Removes AIS state (BMD entry, cached objects). Cloud data remains untouched.
Eviction options:
Eviction is namespace-aware:
See also: Three Ways to Evict Remote Bucket
Namespaces
Namespaces solve real-world scenarios that global namespace cannot handle:
- Account-scoped buckets - SwiftStack, Cloudian bucket names are per-account
- Multiple credentials - Different AWS profiles with overlapping bucket names
- Environment separation - Same bucket name across dev/staging/prod
- Multiple endpoints - Oracle OCI, SwiftStack, and AWS S3 in the same cluster
Syntax
Examples:
Note: The bucket namespace you choose - whether it represents an AWS profile, a GCS account, or simply a human-readable alias - becomes part of the bucket’s physical on-disk path.
In BMD
Metadata-wise, each bucket receives:
- A unique BID (bucket ID)
- Its own bucket props (
Bprops) - Its own credential configuration
Remote AIS Clusters
AIS clusters can attach to each other, forming a global namespace of distributed datasets.
Attaching clusters
Accessing remote buckets
Namespace encoding
The alias resolves to the remote cluster’s UUID, stored in the namespace:
See also: Remote AIS Cluster
Backend Buckets
Backend buckets represent indirection - an AIS bucket that proxies to a remote bucket. This is fundamentally different from namespaces.
Note: See section Working with Same-Name Remote Buckets below for further guidelines and usage examples.
Creating backend relationships
Now reads/writes to ais://cache transparently forward to s3://origin.
Use cases
Hot cache for cold storage:
Dataset aliasing:
Access control:
Disconnecting
Cached objects remain in the AIS bucket.
See also: Backend Bucket CLI examples
System Buckets
AIS distinguishes between user buckets and system buckets.
User buckets are created by users (or lazily on first remote access) and follow standard naming rules: alphanumeric characters, dashes, underscores, and single dots are allowed, up to 64 characters.
System buckets are AIS-internal infrastructure. They are created automatically when needed and are identified by a reserved dot-prefix: names starting with . are reserved for system use. Any attempt to create a user bucket with a .-prefixed name is rejected unless it matches a known system bucket.
The current naming convention is .sys-*. The first system bucket is:
Naming rules
Bucket names are limited to 64 bytes and may contain only letters, digits, dashes (-), underscores (_), and single dots (.). Consecutive dots (..) are not allowed.
Names that start with . are reserved for system buckets. User-defined buckets therefore cannot use a leading dot, and any unrecognized .-prefixed name is rejected.
Visibility and lifecycle
System buckets are visible in regular ais ls output and can be listed and read with appropriate permissions. They are not intended for direct user writes - AIS creates and destroys them behind the scenes, and manages their content.
System buckets are created on demand (for example, ais://.sys-inventory is created on the fly upon the first inventory creation request) and follow the same cluster-wide replication and metasync lifecycle as user buckets.
Future plans
The .sys-* namespace is designed to accommodate additional AIS-internal services over time. Planned and potential uses include:
- Checkpoints - durable storage for multi-hour and multi-day distributed training jobs
- Logs - cluster-wide log aggregation and archival
- Indexes - content indexes for direct access into large archives (TAR, ZIP)
- Inventories - already implemented in v4.3 via
ais://.sys-inventory
Part II: How-To
Table of Contents
- Working with Same-Name Remote Buckets
- Working with Remote AIS Clusters
- Prefetch and Evict
- Access Control
- Provider-Specific Configuration
- List Objects
- Operations Summary
- CLI Quick Reference
- Appendix A: On-Disk Layout
- Reference
Working with Same-Name Remote Buckets
A common scenario: you have buckets with identical names across different AWS accounts, S3-compatible endpoints, or cloud providers. AIS handles this two ways.
Option A: Namespaces (direct access)
Create each bucket with its own namespace and credentials:
Now s3://#prod/data and s3://#dev/data are distinct buckets - separate BMD entries, separate on-disk paths, separate credentials. Access them directly:
Option B: Backend buckets (via AIS proxy)
Create AIS buckets that front the remote buckets:
Access through the AIS buckets:
Which to use?
Namespaces give you direct access with minimal overhead. Backend buckets add a layer of indirection but unlock full AIS bucket capabilities - LRU, mirroring, erasure coding, and transformation pipelines.
Note that Option B requires the namespaced S3 bucket to exist first. You can’t skip straight to backend_bck=s3://data with custom credentials - AIS needs to resolve the backend bucket, which requires proper credentials already in place. Create the namespaced cloud bucket first, then front it with an AIS bucket if needed.
See also: AWS Profiles and S3 Endpoints
GCP / Google Cloud Storage
See also: GCP Per-Bucket Credentials
Working with Remote AIS Clusters
AIS clusters can be attached to each other, forming a global namespace of all individually hosted datasets. For background and configuration details, see Remote AIS Cluster.
Attach remote cluster
List buckets and objects in remote clusters
Prefetch and Evict
Prefetching
Proactively fetch objects from remote storage into AIS cache:
Monitoring prefetch
Evicting
Remove cached objects (cloud data untouched):
Note: The terms “cached” and “in-cluster” are used interchangeably. A “cached” object is one that exists in AIS storage regardless of its origin.
Access Control
Bucket access is controlled by a 64-bit access property. Bits map to operations:
Note: When enabled, access permissions are enforced by AIS and apply to both local and backend operations; misconfiguration can block cold GETs or deletes. See version 4.1 release notes for additional pointers on the topics of authentication and security.
Setting access
Predefined values
See also: Authentication and Access Control
Provider-Specific Configuration
AWS / S3-compatible
See also: AWS Profiles and S3 Endpoints
Oracle Cloud Infrastructure
Google Cloud
Azure
List Objects
ListObjects and ListObjectsPage API (Go and Python) return object names and properties. For large - many millions of objects - buckets we strongly recommend the “paginated” version of the API.
AIS CLI supports both - a quick glance at ais ls --help will provide an idea of all (numerous) supported options.
Basic usage
As always with AIS CLI, a quick look at the command’s help (ais ls --help in this case) may save time.
More basic examples follow below:
Properties
Request specific properties with --props:
Flags
Pagination
For large buckets, results are paginated:
See also: CLI: List Objects
Operations Summary
All operations respect namespaces. ais ls s3://#ns1/bucket and ais ls s3://#ns2/bucket operate on different buckets.
CLI Quick Reference
Appendix A: On-Disk Layout
Note: This section is provided for advanced troubleshooting and debugging only.
The bucket identity you specify in CLI or API - provider, namespace, bucket name - materializes as directory structure on every mountpath. This isn’t just metadata; it’s physical layout.
Say, we have an S3 bucket called s3://dataset, and an object images/cat.jpg in it. Given two different bucket namespaces, the respective FQNs inside AIStore may look like:
where:
Note: disk partitioning not recommended, may degrade performance.
The namespace you choose - whether it maps to an AWS profile, a SwiftStack account, or just a human-readable tag like #prod - becomes a physical directory on every target node. This guarantees:
- Isolation:
s3://#acct1/dataands3://#acct2/datanever share storage paths - No collision: Same-name buckets with different namespaces coexist without conflict
What starts as a logical identifier in ais create s3://#prod/bucket ends up as /mpath/@aws/#prod/bucket/ on disk.
For details, see On-Disk Layout document.