Resources
Resources are what DIAL Core stores for users and applications: files, conversations, prompts, applications, toolsets, and folder-like resources such as skills and projects. Core can hold a changed resource in Redis and write it back to blob storage later. These static settings set size limits, caching, the sync from Redis to blob storage, and the cleanup of folder-like resources. This page is for platform engineers who size Redis and blob storage.
For what "accepted" and "persisted" mean for a write, see State and data lifecycle.
Size, cache, and sync
| Setting | Default | Description |
|---|---|---|
resources.maxSize | 67108864 | The maximum size of a resource, in bytes. |
resources.maxSizeToCache | 1048576 | The maximum size of a resource that Core caches in Redis, in bytes. |
resources.syncPeriod | 60000 | How often Core checks for resources to sync to blob storage, in milliseconds. |
resources.syncDelay | 120000 | How long after its last change a resource is written back to blob storage, in milliseconds. |
resources.syncBatch | 4096 | How many resources Core syncs in one go. |
resources.cacheExpiration | 300000 | How long a synced resource stays in Redis, in milliseconds. |
resources.compressionMinSize | 256 | Core compresses a resource with gzip when its size is at least this many bytes. |
A resource changed within resources.syncDelay may not be in blob storage yet. Plan Redis durability with that window in mind; see Backup and restore.
Expiration per resource type
resources.resourceTypesExpiration sets the expiration per resource type, in milliseconds.
| Setting | Default |
|---|---|
resources.resourceTypesExpiration.FILE | 5 minutes |
resources.resourceTypesExpiration.CONVERSATION | 5 minutes |
resources.resourceTypesExpiration.PROMPT | 5 minutes |
resources.resourceTypesExpiration.APPLICATION | 30 days |
resources.resourceTypesExpiration.TOOL_SET | 30 days |
resources.resourceTypesExpiration.RULES | 30 days (public access rules) |
Folder-like resources
Skills and projects are stored as folders of files. Core enforces these limits on a whole-resource PUT and on a single-file PUT. A request over a limit is rejected and nothing is written. The limits also bound listing reads, ZIP download size, and how long a change holds the resource lock: a single-file PUT copies the whole current version under the lock.
| Setting | Default | Description |
|---|---|---|
complexResource.maxFiles | 100 | The maximum number of files in one resource. |
complexResource.maxTotalBytes | 16777216 | The maximum combined size of all files in one resource, in bytes. |
complexResource.maxFileSizeBytes | 1048576 | The maximum size of one file in a resource, in bytes. |
complexResource.types.<group> | See below | An override per URL group (skills, projects) with any of maxFiles, maxTotalBytes, and maxFileSizeBytes. Unset fields fall back to the values above. |
The built-in projects override allows 1000 files, 67108864 bytes in total, and 5242880 bytes per file. Setting complexResource.types replaces it.
Cleanup sweep
A periodic job reclaims storage for folder-like resources. It finishes deleting resources that were deleted, and removes stale versions left behind by a failed or interrupted write.
| Setting | Default | Description |
|---|---|---|
complexResourceSweep.period | 10000 | The time between sweeps, in milliseconds. |
complexResourceSweep.batch | 1000 | How many references a sweep lists, and can process, per batch. |
complexResourceSweep.activeBatches | 5 | The maximum number of batches one Core instance processes in parallel. The limit is per instance, not across the cluster. |
complexResourceSweep.gracePeriod | 3600000 | The minimum age, in milliseconds, of a deleted resource or a replaced version before the sweep deletes it. It protects readers that started before the change. |
Example
{
"resources": {
"maxSize": 67108864,
"syncDelay": 120000,
"resourceTypesExpiration": {
"FILE": 300000
}
},
"complexResource": {
"types": {
"skills": { "maxFiles": 200 }
}
}
}
The bundled defaults also set resources.heartbeatPeriod to 60000; the Core documentation does not describe it.
Further reading
- Redis — the cache that holds resources before they are synced
- Storage — the blob store resources are synced to
- Access — sharing invitations and per-request keys
- State and data lifecycle — where DIAL keeps state and how to plan retention and recovery
- Back up and restore DIAL — what to back up and how to restore it
- Files and limits — upload limits for files, archives, skills, and projects