Cache size
Based upon the kind of information that streams through your service, you can figure out the size of the cache such that you have the ability to increase the cache hit rate.
Cache expulsion
This describes moving information out of the cache when the cache strikes capability. The most typical pattern utilized for cache expulsion is LRU (least just recently utilized).
Cache expiration
This is the policy of figuring out the length of time we can maintain the information in the cache depending upon either how regularly the information gets revitalized or just how much the client has the ability to manage stagnant information.
Downstream service unavailability
If the downstream service is not available for some factor, cache service need to have the ability to secure the cache for a longer period and, rather of striking the downstream with demands to upgrade the information, wait up until it recuperates. Based upon the sort of compromise you can make with your consumers, either report stagnant information from the cache and prevent browning out the downstream service by demands or have a system to save the mistake reaction from the downstream service and equate it appropriately.
Security
Among the interest in a cache cluster is the security of delicate or client information that’s being cached. The delicate information need to be secured prior to saving, and security ought to be offered while transferring information to and from the cache.
Likewise, because cached information is returned faster than the call that brings from the database, assailants can recognize the kind of demands being made by a service based upon their reaction time. This is called a side-channel timing attack
” Roaring herd” issue
Throughout the unavailability of a downstream service, if several demands are being made to get the uncached information from the downstream service, it might result in several retries being made, which in turn might brown out the service. We can integrate a couple of techniques to alleviate this concern, such as per customer/request throttling, demand coalescing (i.e., just sending out one ask for the exact same uncached information), and others.