Hello,
We are trying to cache the images that Dynatrace uses to calculate bandwidth on our CDN. Will this impact the accuracy of the bandwidth calculation? Are the images truly static and thus able to be served from a CDN, or will they end up being served on the web server anyway?
Answer by Clemens F. ·
Hi Matt,
the bandwidth images are served by the web server agent and have constant sizes:
dynaTraceMonitor?bwstate=0 -> 0 bytes (we use this for measuring the latency)
dynaTraceMonitor?bwstate=1 -> 3 kB
dynaTraceMonitor?bwstate=2 -> 10 kB
dynaTraceMonitor?bwstate=3 -> 30 kB
dynaTraceMonitor?bwstate=4 -> 100 kB
dynaTraceMonitor?bwstate=5 -> 300 kB
dynaTraceMonitor?bwstate=6 -> 1 MB
If a CDN should cache them you must make sure to handle the dynaTraceMonitor?bwstate=* requests accordingly on the CDN and set the "Cache-Control" response header "no-cache" to avoid them from being cached in the browsers cache.
As stated by Rick: if the CDN serves the bandwidth images, bandwidth is calculated for browser to CDN communication!
hth,
Clemens
Answer by Matt H. ·
We want to cache them so we don't have to pay for the bandwidth on a very high volume site. I realize caching them on the cdn is counter intuitive, but we rely heavily on cdn caching, so it kind of makes sense.
Thanks for the reply!
Hi Matt,
The only problem I see here is that dynaTrace is going to imply this is the network time to origin, so if you cached it it would give a very skewed view. My recommendation is if you want to save the bandwidth more than you want to measure network to origin, to simply disable it (I have a customer who also has this disabled).
Hope that helps,
Rick B
Answer by Dominik P. ·
Hi Matt,
the bandwitdh images are generated dynamically as a response to specific dynaTraceMonitor requests. So it is not possible to cache them on your CDN.
The bandwidth is used for the following:
If you relocate the images to a CDN, you might get the "better result" in terms of pure bandwidth of the client, but calculations in dynaTrace might suffer from that. So I would suggest to keep those requests to the web server.
Just out of curiosity - why do you want to move them to a CDN?
Best regards,
Dominik
Answer by Chris S. ·
Matt,
I have tested this myself using two different browsers. From initial findings, the images loaded seem to be dynamically generated as they are different requests. This would mean that in all situations the network bandwidth would end up being served from the web server.
However when you look at our documentation, this states there are 7 total static images ranging in different sizes (dtbwimg_0.jpg to dtbwimg_6.jpg). Perhaps the webserver is dynamically creating a name for the specified files to ensure that the network bandwidth calculation is always hitting your data center since your application is going to generate dynamic data, it would make sense that you would only want to care about the network performance going back to your data center.
User Experience Management#Bandwidth
I would like to see what dT development has to say about this matter. Hopefully one of them will chime in here.
Thanks,
Chris
It seems as though alternate documentation finds the images that I was retrieving from the web server agent. Through this documentation you can assume the images are indeed dynamically generated as it recommended to allow GET-requests on "dynaTraceMonitor?bwstate=*"
Thanks,
Chris
JANUARY 15, 3:00 PM GMT / 10:00 AM ET