I have a question on the behavior of terracotta distributed cache. The explanation is below. Is this behavior correct ?
Scenario 1 – L1 is connected with L2. This setup works fine. When I do a REST PUT the value gets into the L2 cache and I am able to retrieve the value using a REST GET.
Scenario 2 – L1 is disconnected with L2. I am shutting down Terracotta server array server to simulate this. When I try to do a GET REST call for the previous value I inserted when L2 was up and running I don’t get the value from the L1 cache. Instead it takes around a minute and then responds with 204 No Content.
Killing L2 is not simulating a L1 disconnect. The way I simulate an L1 disconnect is to use the kill SIGSTOP command on the process ID.
The correct behavior of Terracotta will be determined by the heartbeating used (usually in such cases, it will seems like a GC pause).
The way customer use this in production is deploy TC in active-passive scenario. That way you get a NSPOF.