new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Temporal · all subjects

best-practices

124 notes in this subject, read out of this brain and free to use. This is page 3 of 3.

temporal_sticky_cache_size metric overview

temporal_sticky_cache_size metric represents number of Workflow executions currently cached in Worker's memory. Sticky cache improves performance by keeping Workflow state in memory, reducing need to reconstruct Workflow from Event History for every Task. Particularly useful for latency-sensitive Workflows. Direct relationship exists between sticky cache size and Worker memory consumption - as cache size increases so does Worker memory usage. Maximum size of sticky cache can be configured, for example default in Go SDK is 10,000 Workflows. Larger cache improves performance by reducing need to replay Workflow histories but increases memory usage. Monitor this metric alongside Worker memory usage - sudden increase in sticky_cache_size can correlate with increased memory consumption and potential performance issues. If memory consumption too high reduce maximum sticky cache size; if available memory and want to improve performance might increase it.

temporal_sticky_cache_hit_total and temporal_sticky_cache_miss_total metrics

temporal_sticky_cache_hit_total is counter measuring total times Workflow Task found cached Workflow Execution to run against. temporal_sticky_cache_miss_total is counter measuring total times Workflow Task did not find cached Workflow Execution to run against. Sticky Execution feature where Worker caches Workflow Execution and creates dedicated Task Queue to listen on improves performance because Temporal Service only sends new events to Worker instead of entire Event Histories and Workflow doesn't have to Replay. Hit means Worker finds Workflow in cache when processing Workflow Task allowing immediate processing without fetching full Event History from server and Replaying. Miss means Worker didn't find Workflow in cache and must fetch Event History and Replay. Monitoring these two metrics and comparing them helps understand how sticky cache is being used. High rate of cache hits with low rate of cache misses indicates Workflows being scheduled efficiently with minimal need for fetching Event Histories and Replaying.

temporal_sticky_cache_total_forced_eviction_total metric

temporal_sticky_cache_total_forced_eviction_total is counter measuring total number of Workflow Executions forcibly evicted from sticky cache. Sticky Execution feature where Worker caches Workflow Execution and creates dedicated Task Queue improves performance because Temporal Service only sends new events instead of entire Event Histories and Workflow doesn't have to Replay. Forced eviction means Workflow Execution removed from cache before completion typically because cache full and needed room for other Workflow Executions. If Worker needs to process more Tasks for evicted Workflow Execution it must fetch entire Event History from Temporal Service and Replay. Monitoring temporal_sticky_cache_total_forced_eviction_total helps understand how often Workflows evicted from cache. High rate of forced evictions indicates cache size too small for workload and may need to increase WorkflowCacheSize setting if Worker resources can accommodate it.

Temporal Worker sticky cache trade-off

There is a direct trade-off between benefits of cached Workflow data and memory consumed by Workers. Unlimited caching is impossible and requires balancing performance gains with responsible memory usage.

Give your agent this brain