Troubleshooting headers

When using load balancers with possibilities to manipulate HTTP requests and responses it's not uncommon for people to be confused.


  • On which server/member did my request end up on?
  • Was the URI changed?
  • Was the host header change?
  • Is the page slow because of members being down?
  • Was the load balancer causing the slow requests?


But the versatility of the LB can also be used to give this information to internal users with each request by adding information to the response headers.


Example:

X-Virtual-Server-Name: /Partition/virtualserver-443
X-Original-Host: www.facebook.com
X-Host-Sent-To-Server: internal.facebook.com
X-Original-URI: /profile
X-URI-Sent-To-Server: /internal/profile
X-Selected-Pool: /Partition/MyPool-80_pool
X-Active-Members: 4
X-Selected-PoolPort: 80
X-Selected-Server: 192.168.1.20
X-Member-Status: 192.168.1.20 80 up;192.168.1.21 80 up;192.168.1.22 80 up;192.168.1.23 80 up;
X-TimeTaken-BigIP: 2
X-TimeTaken-Server: 53


The iRule

I tried to paste the rule here, but the indentation disappeared and there's no syntax highlighting.


Check here instead:

https://loadbalancing.se/2016/03/26/helping-headers/