redis-benchmarks-specification 0.1.306__py3-none-any.whl → 0.1.307__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of redis-benchmarks-specification might be problematic. Click here for more details.

@@ -1,5 +1,5 @@
1
1
  version: 0.4
2
- name: memtier_benchmark-playbook-session-storage
2
+ name: memtier_benchmark-playbook-session-storage-100k-sessions
3
3
  description: |
4
4
  Runs memtier_benchmark to simulate a session-based SaaS application.
5
5
  The workload mimics user session CRUD, session tracking, organization-level analytics,
@@ -0,0 +1,203 @@
1
+ version: 0.4
2
+ name: memtier_benchmark-playbook-session-storage-1k-sessions
3
+ description: |
4
+ Runs memtier_benchmark to simulate a session-based SaaS application.
5
+ The workload mimics user session CRUD, session tracking, organization-level analytics,
6
+ and rate limiting. It includes realistic key sizes and command mixes representative
7
+ of production traffic (e.g., 400–600B session hashes, ZSETs for analytics, and SETs for tracking).
8
+
9
+ Rate limiting is modeled using an atomic Lua script, inspired by the Upstash Redis example:
10
+ https://github.com/upstash/examples/tree/main/examples/ratelimit-with-redis
11
+
12
+ Each user has a dedicated key in the form of `ratelimit:user-<id>:/api/resource`, which is
13
+ used to track usage under a fixed window. The logic is evaluated atomically with the following script:
14
+
15
+ local key = KEYS[1]
16
+ local limit = 100
17
+ local window = 60
18
+ local current = redis.call("INCR", key)
19
+ if current == 1 then
20
+ redis.call("EXPIRE", key, window)
21
+ end
22
+ if current > limit then
23
+ return 0
24
+ else
25
+ return 1
26
+ end
27
+
28
+ This ensures that rate enforcement and usage tracking are done without race conditions, and
29
+ mirrors a real-world API quota model.
30
+
31
+ The workload emphasizes read-heavy patterns to reflect common SaaS access behavior. The overall
32
+ **read:write ratio is approximately 85:15**, with read operations covering session access, user-session
33
+ lookups, org analytics, and rate limit enforcement, while writes handle session updates, activity tracking,
34
+ and quota increments.
35
+
36
+ Command groups by use-case (approximate ratio of total operations):
37
+ - Session CRUD (HGETALL, HSET): ~55%
38
+ - User session tracking (SMEMBERS, SADD): ~21%
39
+ - Organization analytics (ZRANGE, ZADD): ~12%
40
+ - Rate limiting (EVAL-based quota check): ~12%
41
+
42
+ exporter:
43
+ redistimeseries:
44
+ break_by:
45
+ - version
46
+ - commit
47
+ timemetric: $."ALL STATS".Runtime."Start time"
48
+ metrics:
49
+ - $."BEST RUN RESULTS".Hgetalls."Ops/sec"
50
+ - $."BEST RUN RESULTS".Hsets."Ops/sec"
51
+ - $."BEST RUN RESULTS".Smemberss."Ops/sec"
52
+ - $."BEST RUN RESULTS".Sadds."Ops/sec"
53
+ - $."BEST RUN RESULTS".Zranges."Ops/sec"
54
+ - $."BEST RUN RESULTS".Zadds."Ops/sec"
55
+ - $."BEST RUN RESULTS".Evals."Ops/sec"
56
+ - $."BEST RUN RESULTS".Totals."Ops/sec"
57
+ - $."BEST RUN RESULTS".Totals."Latency"
58
+ - $."BEST RUN RESULTS".Totals."Misses/sec"
59
+ - $."BEST RUN RESULTS".Totals."Percentile Latencies"."p50.00"
60
+ - $."BEST RUN RESULTS".Totals."Percentile Latencies"."p99.00"
61
+ - $."ALL STATS".Hgetalls."Ops/sec"
62
+ - $."ALL STATS".Hsets."Ops/sec"
63
+ - $."ALL STATS".Smemberss."Ops/sec"
64
+ - $."ALL STATS".Sadds."Ops/sec"
65
+ - $."ALL STATS".Zranges."Ops/sec"
66
+ - $."ALL STATS".Zadds."Ops/sec"
67
+ - $."ALL STATS".Evals."Ops/sec"
68
+ - $."ALL STATS".Totals."Ops/sec"
69
+ - $."ALL STATS".Totals."Latency"
70
+ - $."ALL STATS".Totals."Misses/sec"
71
+ - $."ALL STATS".Hgetalls."Percentile Latencies"."p50.00"
72
+ - $."ALL STATS".Hsets."Percentile Latencies"."p50.00"
73
+ - $."ALL STATS".Smemberss."Percentile Latencies"."p50.00"
74
+ - $."ALL STATS".Sadds."Percentile Latencies"."p50.00"
75
+ - $."ALL STATS".Zranges."Percentile Latencies"."p50.00"
76
+ - $."ALL STATS".Zadds."Percentile Latencies"."p50.00"
77
+ - $."ALL STATS".Evals."Percentile Latencies"."p50.00"
78
+ - $."ALL STATS".Totals."Percentile Latencies"."p50.00"
79
+ - $."ALL STATS".Totals."Percentile Latencies"."p99.00"
80
+
81
+
82
+ dbconfig:
83
+ configuration-parameters:
84
+ save: '""'
85
+ resources:
86
+ requests:
87
+ memory: 1g
88
+ init_lua: |
89
+ -- Use a fixed seed for reproducibility
90
+ local seed = 12345
91
+ math.randomseed(seed)
92
+
93
+ local now = tonumber(redis.call('TIME')[1])
94
+
95
+ local function rand_str(len)
96
+ local chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'
97
+ local res = ''
98
+ for i = 1, len do
99
+ local idx = math.random(#chars)
100
+ res = res .. chars:sub(idx, idx)
101
+ end
102
+ return res
103
+ end
104
+
105
+ for i = 1, 1000 do
106
+ local session_id = 'session:' .. i
107
+ local user_id = 'user-' .. i
108
+ local org_id = 'org-' .. i
109
+
110
+ redis.call('HSET', session_id,
111
+ 'userId', user_id,
112
+ 'organizationId', org_id,
113
+ 'role', 'member',
114
+ 'createdAt', tostring(now - math.random(3600)),
115
+ 'lastAccessed', tostring(now),
116
+ 'ipAddress', '192.168.1.' .. (i % 255),
117
+ 'device', 'device-' .. rand_str(8),
118
+ 'authMethod', 'password',
119
+ 'status', 'active',
120
+ 'metadata', rand_str(200 + (i % 100))
121
+ )
122
+
123
+ redis.call('SADD', 'user:' .. i .. ':sessions', session_id)
124
+
125
+ local org_key = 'org:' .. i .. ':sessions'
126
+ for j = 1, 10 do
127
+ local uid = 'user-' .. ((i + j) % 1000 + 1)
128
+ local sid = 'session:' .. ((i + j) % 1000 + 1)
129
+ local zmember = uid .. ':' .. sid
130
+ local zscore = now - math.random(86400)
131
+ redis.call('ZADD', org_key, zscore, zmember)
132
+ end
133
+
134
+ local endpoint = '/api/resource'
135
+ local rate_key = 'ratelimit:' .. user_id .. ':' .. endpoint
136
+ redis.call('INCR', rate_key)
137
+ redis.call('EXPIRE', rate_key, 60)
138
+ end
139
+
140
+ return 'OK'
141
+ tested-groups:
142
+ - hash
143
+ - zset
144
+ - set
145
+ - string
146
+
147
+ tested-commands:
148
+ - hgetall
149
+ - hset
150
+ - smembers
151
+ - sadd
152
+ - zrange
153
+ - zadd
154
+ - incr
155
+ - expire
156
+ - get
157
+
158
+ redis-topologies:
159
+ - oss-standalone
160
+ build-variants:
161
+ - gcc:8.5.0-amd64-debian-buster-default
162
+ - dockerhub
163
+
164
+ clientconfig:
165
+ run_image: redislabs/memtier_benchmark:edge
166
+ tool: memtier_benchmark
167
+ arguments: >
168
+ --key-prefix ""
169
+ --key-minimum 1
170
+ --key-maximum 1000
171
+ --data-size-range=400-600
172
+ --pipeline=1
173
+ --print-percentiles=50,90,95,99
174
+ --run-count=1
175
+ --test-time=120
176
+ --command="HGETALL session:__key__"
177
+ --command-key-pattern=R
178
+ --command-ratio=50
179
+ --command="HSET session:__key__ userId user-__key__ organizationId org-__key__ role admin email user__key__@example.com name "User __key__" permissions "["read","write"]" lastActivity __timestamp__ ipAddress 192.168.1.__key__ userAgent "Mozilla/5.0" createdAt __timestamp__"
180
+ --command-key-pattern=R
181
+ --command-ratio=5
182
+ --command="SMEMBERS user:__key__:sessions"
183
+ --command-key-pattern=R
184
+ --command-ratio=18
185
+ --command="SADD user:__key__:sessions session-__key__"
186
+ --command-key-pattern=R
187
+ --command-ratio=3
188
+ --command="ZRANGE org:__key__:sessions 0 -1 WITHSCORES"
189
+ --command-key-pattern=R
190
+ --command-ratio=10
191
+ --command="ZADD org:__key__:sessions 1 user-__key__:session-__key__"
192
+ --command-key-pattern=R
193
+ --command-ratio=2
194
+ --command='EVAL "local key=KEYS[1];local limit=10;local window=60;local current=redis.call(\"INCR\",key);if current==1 then redis.call(\"EXPIRE\",key,window) end;if current>limit then return 0 else return 1 end" 1 ratelimit:user-__key__:/api/resource'
195
+ --command-key-pattern=R
196
+ --command-ratio=12
197
+ --hide-histogram
198
+ resources:
199
+ requests:
200
+ cpus: '4'
201
+ memory: 2g
202
+
203
+ priority: 150
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: redis-benchmarks-specification
3
- Version: 0.1.306
3
+ Version: 0.1.307
4
4
  Summary: The Redis benchmarks specification describes the cross-language/tools requirements and expectations to foster performance and observability standards around redis related technologies. Members from both industry and academia, including organizations and individuals are encouraged to contribute.
5
5
  Author: filipecosta90
6
6
  Author-email: filipecosta.90@gmail.com
@@ -271,11 +271,12 @@ redis_benchmarks_specification/test-suites/memtier_benchmark-nokeys-pubsub-mixed
271
271
  redis_benchmarks_specification/test-suites/memtier_benchmark-nokeys-pubsub-mixed-100-channels-128B-100-publishers-50K-subscribers-5k-conns.yml,sha256=mh_cAomSjsU4WL2l9gt0dhyWdSwfXTrEZgnRz6gzSQE,1144
272
272
  redis_benchmarks_specification/test-suites/memtier_benchmark-nokeys-pubsub-publish-1K-channels-10B-no-subscribers.yml,sha256=zwb27Jmg0mwcthbmdUe0KuzqRzAPs7OHcK2gc9-5VBE,779
273
273
  redis_benchmarks_specification/test-suites/memtier_benchmark-nokeys-server-time-pipeline-10.yml,sha256=7G_J8kUFay7jXhZvsZK5jvVHSLZvhMV0uuDMkZBbeSQ,675
274
- redis_benchmarks_specification/test-suites/memtier_benchmark-playbook-session-storage.yml,sha256=Q5JKvADD1R71hyRx4Qsz5dxHHlYICHqWHD7XTAmX72M,6936
274
+ redis_benchmarks_specification/test-suites/memtier_benchmark-playbook-session-storage-100k-sessions.yml,sha256=FNy157KK1Vmru9xervxuu_A9qOqzwrq9iRLUVJRWiRs,6950
275
+ redis_benchmarks_specification/test-suites/memtier_benchmark-playbook-session-storage-1k-sessions.yml,sha256=W6HnNaVhm6qcoEuwkT1Bv_o9hV0r55W58NLKwtlsjhM,6944
275
276
  redis_benchmarks_specification/test-suites/template.txt,sha256=d_edIE7Sxa5X7I2yG-Io0bPdbDIHR0oWFoCA3XUt_EU,435
276
277
  redis_benchmarks_specification/vector-search-test-suites/vector_db_benchmark_test.yml,sha256=PD7ow-k4Ll2BkhEC3aIqiaCZt8Hc4aJIp96Lw3J3mcI,791
277
- redis_benchmarks_specification-0.1.306.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
278
- redis_benchmarks_specification-0.1.306.dist-info/METADATA,sha256=YXGMeLns9PKM1pTM2AQu_jE5ccwTGApGBMr4Ss-OPJQ,22726
279
- redis_benchmarks_specification-0.1.306.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
280
- redis_benchmarks_specification-0.1.306.dist-info/entry_points.txt,sha256=x5WBXCZsnDRTZxV7SBGmC65L2k-ygdDOxV8vuKN00Nk,715
281
- redis_benchmarks_specification-0.1.306.dist-info/RECORD,,
278
+ redis_benchmarks_specification-0.1.307.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
279
+ redis_benchmarks_specification-0.1.307.dist-info/METADATA,sha256=KN91I2NWKvrfOaIv9uclbBlLUGxktFOKZEWSqLCsDBw,22726
280
+ redis_benchmarks_specification-0.1.307.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
281
+ redis_benchmarks_specification-0.1.307.dist-info/entry_points.txt,sha256=x5WBXCZsnDRTZxV7SBGmC65L2k-ygdDOxV8vuKN00Nk,715
282
+ redis_benchmarks_specification-0.1.307.dist-info/RECORD,,