Apdex is Fatally Flawed
Apdex is Fatally Flawed
Join the DZone community and get the full member experience.Join For Free
Maintain Application Performance with real-time monitoring and instrumentation for any application. Learn More!
Here is the purpose of Apdex as quoted from the specification document referenced above: “ Apdex is a numerical measure of user satisfaction with the performance of enterprise applications, intended to reflect the effectiveness of IT investments in contributing to business objectives.” While this is a noble goal, Apdex can lead you to believe your application is working fine when users are really frustrated. If Apdex is all you have to analyze your application performance, then it is better than nothing, but I’m going to show you the drawbacks and a better way to manage your application performance.
The FormulaThe core fatal flaw in the Apdex specification is the formula used to derive your Apdex index. Apdex is an index from zero to one derived using the formula shown below.
At the heart of Apdex is a static threshold (defined as T). The T threshold is set as a measure of the ideal response time for the application. This T threshold is set for an entire application. If you’ve been around application performance for a while you should immediately realize that all application functions perform at very different levels comparatively. For example, my “Search for Flights” function response time will be much greater than my “View Cart” response time. These 2 distinctly different functionalities should not be subjected to the same base threshold (T) for analysis and alerting purposes.
Another thing that application performance veterans should pick up on here is that static thresholds stink. You either set them too high or too low and have to keep adjusting them to a level you are comfortable with. Static thresholds are notorious for causing alert storms (set too low) or for missing problems (set too high). This manual adjustment philosophy leads to a lack of consistency and ultimately makes historical Apdex charts useless if there have been any manual modifications of “T”.
So let’s take a look at the Apdex formula now that we understand “T” and its multiple drawbacks:
- Satisfied count = the number of transactions with a response time between zero and T
- Tolerating count = the number of transactions with a response time between T and F (F is defined next)
- F = four times T (if T=3 seconds than F=12 seconds)
- Frustrated count (not shown in the formula but represented in Total samples) = the number of transactions with a response time greater than F
When my colleague Ian Withrow looked at the formula above, he had some interesting thoughts on Apdex:
“When was the last time you "tolerated" a site loading four times slower than you expected it to? If T=1 I’ll tolerate four seconds, but if T=3 no way am I waiting 12 seconds on a fast connection … which brings me to another point. The notion of a universal threshold for satisfied/tolerating is bunk even for the same page (let alone different pages). My tolerance for how a website loads at work on our fast connection is paper thin. It better be one or two seconds or I’m reloading or going elsewhere. On the train to work where I know signal is spotty on my iPhone, I’ll load something and then wait for a few seconds.”Getting back to the Apdex formula itself; assuming every transaction completes in less than the static threshold (T) the Apdex will have a value of 1.00, which is perfect, except the real world is never perfect, so let’s explore a more plausible scenario.
You run an e-Commerce website. Your customers perform 15 clicks while shopping for every one click of the checkout functionality. During your last agile code release, the response time of the check-out function went from four seconds to over 40 seconds due to an issue with your production configuration. Users are abandoning your website and shopping elsewhere since their check-outs are lost in oblivion. What does Apdex say about this scenario? Let’s see …
T = four seconds
Total samples = 1500
Satisfied count = 1300 (assuming most were under four seconds with a few between four and 16 seconds (F=4T))
Tolerating count = 100 (the assumed number of transactions between four and 16 seconds)
Apdex = .90
According to the Apdex specification, anything from a .85 - .93 is considered “good”. We know there is a horrible issue with checkout that is crushing our revenue stream, but Apdex doesn’t care. Apdex is not a good way to tell if your application is servicing your business properly. Instead, it is a high-level reporting mechanism that shows overall application trends via an index. The usefulness of this index is questionable based on the fact that Apdex is completely capable of manipulation based on manually changing the T threshold. Apdex, like most other forms of analytics, must be understood for what it is and applied to the appropriate problem.
A Better Way: Dynamic Baselines and AnalyticsIn my experience (and I have a lot of enterprise production monitoring experience), static thresholds and high-level overviews of application health have limited value when you want your application to be fast and stable regardless of the functionality being used. The highest value methodology I have seen in a production environment is automatic baselining with alerts based upon deviation from normal behavior. With this method, you never have to set a static threshold unless you have a really good reason to (like ensuring you don’t breach a static SLA). The monitoring system automatically figures out normal response time, compares each transaction's actual response time to the baseline and classifies each transaction as normal, slow, or very slow. Alerts are based on how far each transaction has deviated from normal behavior instead of an index value based on a rigid four times the global static threshold, like with Apdex.
If you want to make yourself look great to your bosses (momentarily), then set your T threshold to 10 seconds and let the Apdex algorithm make your application look awesome. If you want to be a hero to the business, then show them the problems with Apdex and take a free trial of AppDynamics Pro today. AppDynamics will show you how every individual business transaction is performing and can even tell you if your application changes are making or costing you money.
Opinions expressed by DZone contributors are their own.