This reverts commit 51d1efead6.
This doesn't work. What we want is something like:
map $sent_http_content_type $buffering {
default "on"; # Enable buffering by default
"text/event-stream" "off"; # Disable buffering for SSE responses
}
proxy_buffering $buffering;
unfortunately, proxy_buffering does not support variables.
https://mailman.nginx.org/pipermail/nginx/2023-November/ZGQLNBVQEG5KNLH55HTR4R4NFODBSIU3.html
Upstream has to possibly to X-Accel-Buffering to 'no' . Otherwise, we have to ship
nginx in the package.
Gzip buffers output by default to optimize compression. This buffering delays the transmission of
events—breaking the “real-time” feel of SSE. Instead of seeing each event instantly, the client
might see a batch of events all at once after the gzip buffer flushes (which could take seconds or more).
gzip_types is a whitelist . But certain modules like proxies can not honor it.
The Host header will help the destination request identify which
service the request is meant for. This can potentially be an internal
endpoint identifier.
X-Forwarded-Host is meant to have the external facing server endpoint.
This means that: if the user wants to expose internal.service.com which
resolves to some internal IP as external.service.com, then:
* Host header has to be internal.service.com
* X-Forwarded-Host is external.service.com
* proxy_pass to internal.service.com
The default when proxying is $proxy_host.
Proxied apps must used X-Forwarded-Host header to determine the intended
target. I think we overwrote the Host header back in the day because apps
had varied support for this. Ideally, it can be removed across all our configurations.
Previously, the du plugin was collecting data every 20 seconds but
carbon was configured to only keep data every 12 hours causing much
confusion.
In the process of reworking this, it was determined:
* No need to collect disk usage info over time. Not sure how that is useful
* Instead, collect CPU/Network/Block info over time. We get this now from docker stats
* We also collect info about the services (addon containers)
* No need to reconfigure collectd for each app change anymore since there is no per
app collectd configuration anymore.