large_​file_​optimization

Version: v2025-01-13Includes use: Yes

Behavior name: Large File Optimization

The Large File Optimization (LFO) feature improves performance and reliability when delivering large files. You need this behavior for objects larger than 1.8GB, and you should apply it to anything over 100MB. You should apply it only to the specific content to be optimized, such as a download directory's .gz files, and enable the use_versioning option while enforcing your own filename versioning policy. Make sure you meet all the requirements and best practices for the LFO delivery.

Note: Use NetStorage for objects larger than 1.8GB.

To configure partial object caching and HTTP/2 prefetching, see the large_file_optimization_advanced behavior.

Default behavior

These samples reflect the behavior's default settings. You can use these as is in your configurations or make adjustments based on the behavior's available options.

data "akamai_property_rules_builder" "large_file_optimization" {
  rules_v2025_02_18 {
    name     = "Large File Optimization"
    comments = "Improves performance and reliability when delivering large files."
    behavior {
      large_file_optimization {
        enabled = true
        maximum_size = "16GB"
        minimum_size = "100MB"
        enable_partial_object_caching = "PARTIAL_OBJECT_CACHING"
        use_versioning = true
      }
    }
  }
}
"behaviors": [
  {
  "name": "largeFileOptimization",
  "options": {
    "enabled": true,
    "enablePartialObjectCaching": "PARTIAL_OBJECT_CACHING",
    "minimumSize": "100MB",
    "maximumSize": "16GB",
    "useVersioning": true
    }
  }
]

Options

Option Description
enabled
Enables the file optimization behavior.
enable_partial_object_caching
Specifies whether to cache partial objects. Value is one of:
  • PARTIAL_OBJECT_CACHING. Allows partial-object caching, which always applies to large objects served from NetStorage. The size of the object to be cached can't be greater than 323 GB. To enable this, the origin needs to support byte range requests.
  • NON_PARTIAL_OBJECT_CACHING. Caches entire objects. The size of the object to be cached can't be greater than 1800 MB.
minimum_size
Optimization only applies to files larger than this, expressed as a number suffixed with a unit string such as MB or GB.
maximum_size
Optimization does not apply to files larger than this, expressed as a number suffixed with a unit string such as MB or GB. The size of a file can't be greater than 323 GB. If you need to optimize a larger file, contact Akamai Professional Services for help.
use_versioning
When enable_partial_object_caching is set to PARTIAL_OBJECT_CACHING, enabling this option signals your intention to vary filenames by version, strongly recommended to avoid serving corrupt content when chunks come from different versions of the same file.