[Do not merge] Omes scenario to stress test Temporal's visibility layer#304
Draft
deepakkarki wants to merge 6 commits intomainfrom
Draft
[Do not merge] Omes scenario to stress test Temporal's visibility layer#304deepakkarki wants to merge 6 commits intomainfrom
deepakkarki wants to merge 6 commits intomainfrom
Conversation
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Visibility Stress Test
What It Does
The
visibility_stressscenario generates controlled read and write traffic against Temporal'svisibility store (Elasticsearch or SQL). It creates short-lived workflows that perform custom
search attribute (CSA) updates, while separate goroutines issue List/Count queries and explicit
deletes.
Note : This scenario focuses on benchmarking the visibility store - not testing the correctness or
any other portion of the temporal workflow engine.
Operations Exercised
wfRPS)UpsertSearchAttributesinside each workflow (atwfRPS * updatesPerWF)failPercent)timeoutPercent)deleteRPS)Quick Start
# Simplest possible run (single namespace, write + read, 5 minutes) go run ./cmd run-scenario-with-worker \ --scenario visibility_stress --language go \ --duration 5m \ --option loadPreset=light --option queryPreset=light \ --option csaPreset=smallThis starts a Go worker, registers 6 CSAs on the default namespace, then runs for 5 minutes at
10 workflow starts/sec with light query traffic.
Presets
The scenario is controlled by three independent presets. Each can be selected via
--optionandindividually overridden.
Load Presets (
--option loadPreset=...)Controls write traffic. If omitted, no workflows are created (read-only mode).
lightmoderateheavyno-failuresOverride individual values:
Query Presets (
--option queryPreset=...)Controls read traffic. If omitted, no queries are issued (write-only mode).
lightmoderateheavyQuery types (weighted distribution):
WorkflowType = 'visibilityStressWorker'ExecutionStatus = 'Running'ExecutionStatus != 'Running' AND CloseTime > ...VS_Int_01 > 500)VS_Int_01 > 200 AND VS_Keyword_01 = 'alpha')List queries fetch up to 3 pages to exercise pagination.
CSA Presets (
--option csaPreset=...)Defines which custom search attributes to register and use. Shared by both writer and querier.
smallmediumheavyIf omitted when
loadPresetis set, defaults tomedium. Required in read-only mode.Modes
loadPresetqueryPresetcleanup=true)Common Usage Patterns
Write-Only (Benchmark Inserts/Updates)
Read-Only (Benchmark Queries Against Existing Data)
Run this after a write run that used
csaPreset=medium:Full Benchmark (Writes + Reads)
No Intentional Failures
Custom Failure Rate
High Throughput (No Deletes, Retention Only)
Multi-Namespace
For
namespaceCount > 1, you must run the workers and scenario separately (run-scenario-with-workeris not supported for multi-namespace).For single namespace (
namespaceCount=1, the default), the scenario uses the CLI's--namespaceflag (default:
default). No custom namespaces are created.Cleanup
After a run, workflows may remain on the server. Clean them up:
Cleanup terminates all running workflows and deletes all workflows with
WorkflowType = 'visibilityStressWorker'on the scenario's task queue.All Options Reference
Preset Selection
loadPresetlight,moderate,heavy,no-failuresqueryPresetlight,moderate,heavycsaPresetsmall,medium,heavymedium(if loadPreset set)Load Overrides (apply on top of
loadPreset)wfRPSupdatesPerWF0.5)deleteRPS0= retention only)failPercent0.10= 10%)timeoutPercent0.05= 5%)Query Overrides (apply on top of
queryPreset)countRPSlistRPSNamespace & Environment
namespaceCount1createNamespacesfalsenamespaceCount=1)retention168h24h)Modes
cleanupfalsedeleteNamespacesfalseCLI Flags (not
--option)--duration--language gogo(Go-only scenario)--run-idrun-scenario--iterationsis not supported by this scenario.How It Works (Brief)
wfRPS. Each workflow receivesinstructions (CSA update groups, delay, fail/timeout flags) baked into its input. Fire-and-forget.
(completed / failed / timed out).
deletes them. The list query itself is a visibility read (realistic!).
complexity, fetching up to 3 pages per query.
Derived Rates (Logged at Startup)
wfRPS * updatesPerWFwfRPS(at steady state)updatesPerWF * updateDelay(then completes/fails/times out)Example Startup Log