With Ehcache and spring what happens if a load balanced server become unavailable? -
i'm working on web app ehcache deployed. app load balanced between multiple servers. app installed on each server , when user accesses app he/she redirected 1 of load balanced servers.
is understanding of following correct? if user makes request key , it's annotated @cacheable
check made value in ehcache store. if key in store value returned ehcache, if key not in store key , value added store , value returned. if 1 of load balanced servers becomes unavailable , user requests value has been cached in now-unavailable server new value added cache store , returned user described above.
there no risk of user requesting key not available, there?
i don't understand mean a key not available.
essentially, spring caching abstraction works more or less described. spring delegates actual caching business configured caching library. in case, ehcache.
if have 1 cache per node, each node have copy of data. if 1 server goes down , user requests not yet in server's store, put in node's store described.
if have distributed cache, fact server goes down meaningless regards question: cached data still available other node.
in case, cacheable
tries retrieve value cache before calling method , returns directly in case of cache hit. in case of cache miss, method executed , result stored in cache.
Comments
Post a Comment