You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/en/user-guide/aws/kinesis/index.md
+16Lines changed: 16 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -173,11 +173,27 @@ You can fetch the CloudWatch logs for your Lambda function reading records from
173
173
174
174
| Variable | Description |
175
175
| -------- | ----------- |
176
+
| `KINESIS_MOCK_PROVIDER_ENGINE` | String value of `node` (default) or `scala` that determines the underlying build of Kinesis Mock. [^scala-future] |
177
+
| `KINESIS_MOCK_MAXIMUM_HEAP_SIZE` | JVM memory format string (default: `512m`) that sets the maximum memory size for the Kinesis Mock Scala server, corresponds to the JVM `-Xmx` flag. [^scala] |
178
+
| `KINESIS_MOCK_INITIAL_HEAP_SIZE` | JVM memory format string (default: `256m`) that sets the initial memory size for the Kinesis Mock Scala server, corresponds to the JVM `-Xms` flag. [^scala] |
176
179
| `KINESIS_ERROR_PROBABILITY` | Decimal value between `0.0` (default) and `1.0`. This environment variable enables you to inject `ProvisionedThroughputException` at random intervals in your application. While this won't provide insight into your application's overall throughput handling, it aids in testing your application's exception-handling capabilities. |
177
180
| `KINESIS_SHARD_LIMIT` | Integer value (default: `100`) or `Infinity` (to disable). Use this variable to assess whether your application conforms to the assigned shard limit. Disabling this behavior requires explicitly setting `KINESIS_SHARD_LIMIT=Infinity`. |
178
181
| `KINESIS_LATENCY` | Integer value in milliseconds (default: `500`) or `0` (to disable). Particularly useful for testing latency-sensitive applications. Since local Kinesis service lacks latency simulation, you can introduce artificial latency into your AWS calls using this variable. To disable this behavior, set `KINESIS_LATENCY=0`. |
179
182
| `KINESIS_INITIALIZE_STREAMS` | **Deprecated.** Comma-delimited string with stream names, corresponding shard counts, and an optional region for initialization during startup. If no region is provided, the default region is used. For example, `KINESIS_INITIALIZE_STREAMS=my-first-stream:1,my-other-stream:2:us-west-2,my-last-stream:1`. In multi-account setups, the specified streams will be created for all accounts. |
180
183
184
+
### Performance Tuning
185
+
186
+
For high-volume workloads or large payloads, we recommend switching to the Scala engine via the `KINESIS_MOCK_PROVIDER_ENGINE=scala` flag, delivering up to 10x better performance compared to the default Node.js engine.
187
+
188
+
Additionally, the following parameters can be tuned:
189
+
190
+
- Increase `KINESIS_MOCK_MAXIMUM_HEAP_SIZE` beyond the default `512m` to reduce JVM memory pressure. [^scala]
191
+
- Increase `KINESIS_MOCK_INITIAL_HEAP_SIZE` beyond the default `256m` to pre-allocate more JVM heap memory. [^scala]
192
+
- Reduce `KINESIS_LATENCY` artificial response delays from the default `500` milliseconds (or disable entirely with `0`).
193
+
194
+
[^scala]: This feature is only available in the more performant Scala Kinesis Mock build that can be toggled by setting `KINESIS_MOCK_PROVIDER_ENGINE=scala`.
195
+
[^scala-future]: Future versions of LocalStack will likely default to using the `scala` engine over the less-performant `node` version currently in use.
196
+
181
197
## Resource Browser
182
198
183
199
The LocalStack Web Application provides a Resource Browser for managing Kinesis Streams & Kafka Clusters.
0 commit comments