Adjust the Input Bucket Polling Interval
Local Encoder polls your input file location (such as an AWS S3 or GCS bucket) at set intervals to check for any new files for processing. The default interval varies depending on the value of the LR_VAULT_MODE parameter: The interval for Default mode is 1000 ms (1 second) and the interval for Task mode is 10000 ms (10 seconds).
You can optionally increase the polling interval to reduce AWS S3 or GCS ListBucket API calls and their associated costs.
You can optionally use the following configuration parameters to increase the polling interval if your buckets are updated infrequently. You can also add an initial delay to let the app "warm up" before the first poll.
Configuration Parameter | Description | Default Value | Example |
|---|---|---|---|
| The interval in milliseconds to check for new files in the input bucket. The default value varies depending on whether your |
|
|
| The initial delay in milliseconds before the first poll starts. For example, you could specify 30000 to delay the first poll by 30 seconds to ensure the application is fully initialized before file discovery begins. | 0 ms |
|
Operational Considerations
When configuring these parameters, consider the following:
Cost vs. freshness: Higher intervals reduce API costs but increase time-to-detect for new files. For example, consider the following polling frequencies:
Frequent updates (near-real-time): LR_DEFAULT_POLLER_PERIOD = 1000–5000 ms
Periodic updates (every few minutes): LR_DEFAULT_POLLER_PERIOD = 30000–300000 ms
Infrequent updates (hourly or daily): LR_DEFAULT_POLLER_PERIOD = 3600000–43200000 ms
Caution
Increasing the polling interval reduces API calls but will delay the discovery and processing of new files. Choose values that meet your freshness SLAs.
Mode awareness: The default value for LR_DEFAULT_POLLER_PERIOD may differ by deployment mode (Default vs. Task Mode). Override explicitly if you need consistent behavior across modes.
Backlog effects: If files arrive in large batches, a longer interval can delay detection of the entire batch; ensure downstream throughput matches your detection cadence.
Cloud provider quotas: Lower polling frequency can help stay within AWS S3 or GCS request quotas and avoid throttling.
Observability: Correlate poll intervals with observed discovery latency in metrics to choose a balanced value.
Polling Interval FAQs
No, files are not missed and are discovered later. The trade-off is between how quickly new files are detected and API costs.
Only if your application or environment requires warm-up time (such as for credentials loading or for cache priming). Otherwise, keep it at 0 ms.
Check startup logs for the configured values or observe the timing between successive list calls in your logs.