06 Dec 2020 10:00 AM
I have an application that is setup to analyze only 50% of user sessions. The application runs on two webservers, but only one is instrumented by OneAgent.
Now, I would expect that I'm capturing 1/4 of all user actions, but that doesn't seem to be the case.
The problem seems to be related to the load balancing I'm using. It's basically round-robin, so requests hit each one of the servers in a random way. So, when a page is instrumented by OneAgent, the request grabbing the ruxitagentjs*.js might fail because it might be directed to the server that is not instrumented. And even if I get the Javascript from the instrumented server, I might not then be able to submit the data in the XHR requests.
So, it's basically a combinatorics problem. Has anyone had the issue before, or does anyone have the formula for how to extrapolate total user actions in such scenarios?
06 Dec 2020 10:29 PM
Do you have a cluster activegate? you could try to redirect the beacon to it, so at least when the JS is served, the XHR goes to something that is always listening. I did something similar for an application that had hard rules FW so we couldn't actually submit the POST to the OA injecting the app since it wouldn't allow it to pass...
07 Dec 2020 08:53 AM
Interesting idea, but won't work in this case, as there is no Cluster AG.
07 Dec 2020 09:47 AM
I wonder if browser do not cache web pages so it loads javascript agent even if you switch the web server. Maybe try to check some user sessions how they start and finish.
07 Dec 2020 10:55 AM
I had done the check from the browser side using Developer Tools, after discovering a discrepancy in what were the values I would expect. So basically I had initially thought along these lines:
I believe this will be even more complex if more that two servers are involved. But even with two, it seems more complicated than I had anticipated.