The difference between best effort and assurance

time to read 2 min | 399 words

Let us take a messaging system as an example. One messaging system will make a "best effort" attempt to avoid delivering duplicate messages. A second system make the assurance that it will not do so.

What is the difference between the two?

Best effort means that the system will make reasonable attempts to prevent it, but there are situations where this may still happen. Assurance means that it cannot happen. You can rely on it happening.

Another example of a best effort vs. assurance is with caching vs. storage. A caching system will make a best effort attempt to keep the values around, but it is entirely possible that they will be purged by the time you end up reading them again. A storage system guarantee that if you put a value there, it will exist when you try to read it.

On the face of it, having assurances is a very desirable quality. If I can rely on something being there, I can use it much more easily. But the problem with assurances is that they tend to be costly, when you really come to rely on them.

In the messaging system, this assurance cost the need to do a sync between all receiving end points, deal with corrupt messages and potential simultaneous sends, just to consider a few things on top of my head. In a storage system, this assurance will bite you when you finally reach the storage limits of the system.

Depending on the exact requirements, you need to choose whatever to use a system that makes a best effort attempt or a system that make the assurance. Furthermore, you also need to decide if your own systems needs to offer an assurance (with its added cost), or whatever they can be built to make a best effort and rely on other factors to give us this assurance.

As a simple example, in the messaging system, we can rely on idempotent messages to deal with duplicate messages, and in the cache scenario, we can load from cache if it is not there. Other times, trying to build the assurance on top of best effort system is extremely expensive. Trying to build an ACID store on top of a file system is non trivial, for example.

As usual, you need better context to decide how to act.