Setting X_REQUEST_START header in the NGINX controller

Hi!

We’d like to start measuring request queue time in our app servers. We need the X_REQUEST_START header containing a UNIX timestamp to be present for this. Usually it is set by the load-balancer, and seems like for Qovery apps, the ideal place for this header to be hydrated would be in the NGINX controller. The issue is that controllers do not add this header by default.

Is it something that is already possible to implement? Or would it require Qovery to introduce additional functionality, such as enhancing capabilities of the advanced network.ingress.extra_headers setting?

Hello @daniilsvetlov ,

I think you can achieve what you want by adding by adding {"X_REQUEST_START":"$msec"} to the network.ingress.extra_headers advanced settings of your service.
Let me know if it does what you expected.

Regards

Thanks for the suggestion @Pierre_Gerbelot!

Unfortunately, it seems like this option sets the response headers only.

I see my header configured via extra_headers in a response to my CURL request, but I need the X_REQUEST_START header to be set via NGINX’s proxy_set_header, so that it’s propagated to upstream services, and they, in turn, make use of it. The headers configured with extra_headers do not seem to be propagated to upstream requests.

Would it be possible to expose setting proxy headers via a separate advanced configuration? It would help us tremendously with monitoring and scaling of our app servers.

Hello @daniilsvetlov

A new advanced settings named ‘network.ingress.proxy_set_headers’ has been added.
Let me know if you encounter any issue with it

Thank you.
.

1 Like

Hi @Pierre_Gerbelot!

Thank you for such a quick implementation! Works like a charm.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.