Hello Everyone,
I have implemented the logic for dispatcher on Apache Server programatically.
My logic for dispatcher is like below one.
-Step01 : Delete old cache.
-Step02 : Create new cache.
But I found serious issue when I tested cache on dispatcher.
New cache was always deleted because creating new cache was faster than deleting old cache.
So I had to add 1 second for waiting time before new cache was created like below one.
boolean deleted = DispatcherUtil.invokeToDeleteCache(resolver, replicationAction.getPaths(), ReplicationActionType.DELETE);
if (deleted) {
try {
TimeUnit.SECONDS.sleep(1); // wait 1 second
} catch (InterruptedException e) {
log.error(e.getMessage(), e);
}
DispatcherUtil.invokeToCreateCache(resolver, replicationAction.getPaths());
}
After I added 1 second for waiting time, new cache has created successfully.
So I wonder what the average waiting time is as nodes increase like below picture.
How can I measure average waiting time as nodes increase efficiently?
Regards
Chung Yong.