Skip to content

Commit

Permalink
[batcher] Introduce APICAST_POLICY_BATCHER_SHARED_MEMORY_SIZE env var…
Browse files Browse the repository at this point in the history
…iable

In some cases, the batcher policy will run out of storage space (batched_reports)
and cause metrics to not being reported. This commit adds a new environment
variable to configure the shared memory storage size
  • Loading branch information
tkan145 committed Mar 8, 2024
1 parent 6a32024 commit ce7d22c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions doc/parameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,13 @@ Sets the maximum number and size of buffers used for reading large client reques
The format for this value is defined by the [`large_client_header_buffers` NGINX
directive](https://nginx.org/en/docs/http/ngx_http_core_module.html#large_client_header_buffers)

### `APICAST_POLICY_BATCHER_SHARED_MEMORY_SIZE`

**Default:** 20m
**Value:** string

Sets the maximum size of shared memory used by batcher policy.

### `OPENTELEMETRY`

This environment variable enables NGINX instrumentation using OpenTelemetry tracing library.
Expand Down
2 changes: 1 addition & 1 deletion gateway/http.d/shdict.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ lua_shared_dict limiter 1m;
# This is not ideal, but they'll need to be here until we allow policies to
# modify this template.
lua_shared_dict cached_auths 20m;
lua_shared_dict batched_reports 20m;
lua_shared_dict batched_reports {{env.APICAST_POLICY_BATCHER_SHARED_MEMORY_SIZE | default: "20m"}};
lua_shared_dict batched_reports_locks 1m;

0 comments on commit ce7d22c

Please sign in to comment.