Am I able to tweak the ArcGIS publisher to add headers to the service replies?
We have multiple single install ArcGIS servers accessible from one HTML5 app.
I'd like to add a header to the service reply so I know which server it came from.
You can add the header at the web tier - assuming you're using multiple web adaptors?
Actually, i am not using a web adapter at all.
I am getting the services directly from the ArcGIS server.
Anyone have an idea on how to add a header on the actual ArcGIS Server? I am not using the ArcGIS Web adapter.
SOIs allow for post processing of responses. I'm unsure of the ability to add a header to a response though or how APIs and clients would react to an additional header.
About extending services—Documentation | ArcGIS Enterprise
It would likely be more simple to monitor Server logs from each machine as incoming requests will be written at debug level.
Where would you be monitoring the header information? I'd say Philip McNeilly suggestion is the easiest. Set the logs to at least Info and you'll be able to see which machine responded to the request through whatever operation you're running, (exportMap, query, etc). What are you using instead of the Web Adaptors? I'm wondering if you can insert your own custom header once the request reaches your front-end, (Apache, F5, whatever), and then set it to whatever backend machine you're sending the request to.
Retrieving data ...