I wonder how to check availability property from CAP theorem. Consistency check is conceptually easy: if at least once somehow same query at the same time returns different results, then the system may be considered inconsistent (or under some circumstances eventually consistent).
But what about availability? If it takes 1 millisecond for the system to respond, it probably should be considered available. If 1 second for a huge query - probably also available. But what about 50 seconds for a simple query?.. Where is the threshold - how much time should the system take to respond in order to consider it unavailable?
Well, one possible threshold is to consider system unavailable only if it throws some error immediately or doesn't respond at all. But with such definition we may consider available any system that lets the user wait for a long time until all inconsistencies and partitions are resolved.
So my questions are:
1) How do we check if system satisfies availability property as defined in CAP theorem?
2) How do we distinguish the following cases:
- System is available, but it may take 10 minutes to process some huge query.
- Actually system is not available, but there is some wrapper (user calls it instead of the original system) that each time when original system is not available simply waits until it becomes, so to the outside user it looks like the system is available and is simply processing the query.