Docs: Add configuration option for the image renderer (#41798)

* Docs: add configuration option for the image renderer

* Apply review feedback
This commit is contained in:
Agnès Toulet 2021-11-18 18:09:08 +01:00 committed by GitHub
parent 3b497f3e8d
commit e904f423e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 20 additions and 8 deletions

View File

@ -1040,12 +1040,14 @@ rendering_chrome_bin =
# Mode 'reusable' will have one browser instance and will create a new incognito page on each request.
rendering_mode =
# When rendering_mode = clustered you can instruct how many browsers or incognito pages can execute concurrently. Default is 'browser'
# When rendering_mode = clustered, you can instruct how many browsers or incognito pages can execute concurrently. Default is 'browser'
# and will cluster using browser instances.
# Mode 'context' will cluster using incognito pages.
rendering_clustering_mode =
# When rendering_mode = clustered you can define maximum number of browser instances/incognito pages that can execute concurrently..
# When rendering_mode = clustered, you can define the maximum number of browser instances/incognito pages that can execute concurrently. Default is '5'.
rendering_clustering_max_concurrency =
# When rendering_mode = clustered, you can specify the duration a rendering request can take before it will time out. Default is `30` seconds.
rendering_clustering_timeout =
# Limit the maximum viewport width, height and device scale factor that can be requested.
rendering_viewport_max_width =

View File

@ -1012,12 +1012,14 @@
# Mode 'reusable' will have one browser instance and will create a new incognito page on each request.
;rendering_mode =
# When rendering_mode = clustered you can instruct how many browsers or incognito pages can execute concurrently. Default is 'browser'
# When rendering_mode = clustered, you can instruct how many browsers or incognito pages can execute concurrently. Default is 'browser'
# and will cluster using browser instances.
# Mode 'context' will cluster using incognito pages.
;rendering_clustering_mode =
# When rendering_mode = clustered you can define maximum number of browser instances/incognito pages that can execute concurrently..
# When rendering_mode = clustered, you can define the maximum number of browser instances/incognito pages that can execute concurrently. Default is '5'.
;rendering_clustering_max_concurrency =
# When rendering_mode = clustered, you can specify the duration a rendering request can take before it will time out. Default is `30` seconds.
;rendering_clustering_timeout =
# Limit the maximum viewport width, height and device scale factor that can be requested.
;rendering_viewport_max_width =

View File

@ -1711,13 +1711,19 @@ Mode `reusable` will have one browser instance and will create a new incognito p
### rendering_clustering_mode
When rendering_mode = clustered you can instruct how many browsers or incognito pages can execute concurrently. Default is `browser` and will cluster using browser instances.
When rendering_mode = clustered, you can instruct how many browsers or incognito pages can execute concurrently. Default is `browser` and will cluster using browser instances.
Mode `context` will cluster using incognito pages.
### rendering_clustering_max_concurrency
When rendering_mode = clustered you can define the maximum number of browser instances/incognito pages that can execute concurrently.
When rendering_mode = clustered, you can define the maximum number of browser instances/incognito pages that can execute concurrently. Default is `5`.
### rendering_clustering_timeout
> **Note**: Available in grafana-image-renderer v3.3.0 and later versions.
When rendering_mode = clustered, you can specify the duration a rendering request can take before it will time out. Default is `30` seconds.
### rendering_viewport_max_width

View File

@ -72,7 +72,7 @@ RENDERING_MODE=default
#### Clustered
With the `clustered` mode, you can configure how many browser instances or incognito pages can execute concurrently. Default is `browser` and will ensure a maximum amount of browser instances can execute concurrently. Mode `context` will ensure a maximum amount of incognito pages can execute concurrently. You can also configure the maximum concurrency allowed, which per default is `5`.
With the `clustered` mode, you can configure how many browser instances or incognito pages can execute concurrently. Default is `browser` and will ensure a maximum amount of browser instances can execute concurrently. Mode `context` will ensure a maximum amount of incognito pages can execute concurrently. You can also configure the maximum concurrency allowed, which per default is `5`, and the maximum duration of a rendering request, which per default is `30` seconds.
Using a cluster of incognito pages is more performant and consumes less CPU and memory than a cluster of browsers. However, if one page crashes it can bring down the entire browser with it (making all the rendering requests happening at the same time fail). Also, each page isn't guaranteed to be totally clean (cookies and storage might bleed-through as seen [here](https://bugs.chromium.org/p/chromium/issues/detail?id=754576)).
@ -80,6 +80,7 @@ Using a cluster of incognito pages is more performant and consumes less CPU and
RENDERING_MODE=clustered
RENDERING_CLUSTERING_MODE=browser
RENDERING_CLUSTERING_MAX_CONCURRENCY=5
RENDERING_CLUSTERING_TIMEOUT=30
```
```json
@ -88,7 +89,8 @@ RENDERING_CLUSTERING_MAX_CONCURRENCY=5
"mode": "clustered",
"clustering": {
"mode": "browser",
"maxConcurrency": 5
"maxConcurrency": 5,
"timeout": 30
}
}
}