From 96e05fb12d73badfd32865de3cd8f6542352df26 Mon Sep 17 00:00:00 2001 From: Tyler Bigler Date: Mon, 11 May 2020 11:18:20 -0400 Subject: [PATCH 1/2] Notes on multiprocessing and gunicorn vs uwsgi --- docs/additional-features/prometheus-metrics.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/additional-features/prometheus-metrics.md b/docs/additional-features/prometheus-metrics.md index 0aa944b74..448f925e0 100644 --- a/docs/additional-features/prometheus-metrics.md +++ b/docs/additional-features/prometheus-metrics.md @@ -32,3 +32,7 @@ This can be setup by first creating a shared directory and then adding this line ``` environment=prometheus_multiproc_dir=/tmp/prometheus_metrics ``` + +#### Accuracy + +If having long-term-accurate metrics in a multiprocess environment is important to you then it's recommended you use the `uwsgi` library instead of `gunicorn`. The issue lies in the way `gunicorn` tracks worker processes (vs `uwsgi`) which helps manage the metrics files created by the above configurations. If you're using Netbox w/ `gunicorn` in a containerized enviroment following the 1-process-per-container methodology, then you will likely not need to change to `uwsgi`. More details can be found in [this issue](https://github.com/netbox-community/netbox/issues/3779#issuecomment-590547562). \ No newline at end of file From 29abcbced8780fab47e8cd85c50e2b012953e0aa Mon Sep 17 00:00:00 2001 From: Tyler Bigler Date: Wed, 13 May 2020 17:13:41 -0400 Subject: [PATCH 2/2] Grammar improvements --- docs/additional-features/prometheus-metrics.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/additional-features/prometheus-metrics.md b/docs/additional-features/prometheus-metrics.md index 448f925e0..1429fb0a7 100644 --- a/docs/additional-features/prometheus-metrics.md +++ b/docs/additional-features/prometheus-metrics.md @@ -35,4 +35,4 @@ environment=prometheus_multiproc_dir=/tmp/prometheus_metrics #### Accuracy -If having long-term-accurate metrics in a multiprocess environment is important to you then it's recommended you use the `uwsgi` library instead of `gunicorn`. The issue lies in the way `gunicorn` tracks worker processes (vs `uwsgi`) which helps manage the metrics files created by the above configurations. If you're using Netbox w/ `gunicorn` in a containerized enviroment following the 1-process-per-container methodology, then you will likely not need to change to `uwsgi`. More details can be found in [this issue](https://github.com/netbox-community/netbox/issues/3779#issuecomment-590547562). \ No newline at end of file +If having accurate long-term metrics in a multiprocess environment is important to you then it's recommended you use the `uwsgi` library instead of `gunicorn`. The issue lies in the way `gunicorn` tracks worker processes (vs `uwsgi`) which helps manage the metrics files created by the above configurations. If you're using Netbox with gunicorn in a containerized enviroment following the one-process-per-container methodology, then you will likely not need to change to `uwsgi`. More details can be found in [issue #3779](https://github.com/netbox-community/netbox/issues/3779#issuecomment-590547562). \ No newline at end of file