All Products
Search
Document Center

Function Compute:Why is the execution frequency of a Simple Log Service trigger higher than expected?

Last Updated:Apr 01, 2026

The Simple Log Service (SLS) trigger invokes your function once per shard per interval, not once per Logstore. If a Logstore has 10 shards and the call interval is 60 seconds, the function is invoked 10 times every 60 seconds — one invocation per shard. This is expected behavior.

Total invocations per interval = number of shards x 1

Normal behavior

When the trigger is caught up with the latest data, it invokes the function at the configured interval. Each invocation processes data in the time range [now - interval, now).

Example: With a 60-second interval and 10 shards, the function runs 10 times every 60 seconds to process real-time data across all shards.

Catchup behavior

When the lag between the last processed data point and the latest data written to SLS exceeds 10 seconds, the trigger enters catchup mode. In this state, the trigger shortens the call interval to close the gap faster.

Example: With a 60-second interval configured, the trigger may invoke the function every 2 seconds to transform data generated within 60 seconds.

Catchup behavior is by design — the trigger temporarily increases the invocation rate to recover from lag, then returns to the configured interval once it catches up.