For debugging purposes, we would like to configure our pool of load balanced web servers to output an HTTP header identifying the "true" server which served the request. However, we don't know what header name this should be! Is there any pre-existing header for this? Do you have a favorite?
HTTP header for indicating originating server behind load balancer
http
Related Topic
- Iis – Http header 304 and caching
- HTTP Ports are Filtered on New Virtual IPs in LVS (Linux Virtual Server) Load Balancer
- Disable authentication for HTTP OPTIONS method (preflight request)
- How to redirect HTTP to HTTPS on AWS Application Load Balancer
- Extract HTTP Host Header from Nginx Stream Proxy – How to
Best Answer
AFAIK there isn't a formal standard for this. What I've seen is:
A custom HTTP header. It's really your choice as long as you stay in the X- namespace. For me personally
X-Backend-Server
is descriptive, and it seems popular.Writing the backend server ID into an HTML comment at the end of the content body.
Update: I found this survey of HTTP headers in the wild from 2011. My suggestion
X-Backend-Server
is number 119, whileX-Server-Name
is number 56 on the list. So I'd sayX-Server-Name
seems the most common header for this.