Vikee
Vikee

Reputation: 40

Cassandra client behaviour during GC pause

Consider a scenario where we have a cassandra cluster with nodes [A,B,C], Now client X makes request which goes to node A. Now if old gc starts running on A. Node A will be paused. Now what will be behaviour of client request in below cases

  1. GC Pause start before Client request reaches A
  2. GC Pause start after Client request reaches A

will request goes to another node or it will be keep waiting for reply till specified timeout.

Also does read latency metric in cassandra consider this GC pause time?

Upvotes: 0

Views: 542

Answers (1)

Jim Meyer
Jim Meyer

Reputation: 9475

As far as I know, the driver is not aware of when nodes are experiencing a GC Pause. The assumption is that GC pauses will generally be short.

From what I have seen, this causes the response time of some requests to occasionally spike if they happen to arrive at the node during a GC pause.

I imagine if the GC pause was long enough, then the client would get a timeout error and would need to retry the request.

I don't use any of the latency metrics provided by Cassandra. I think it's more accurate to measure latency in your client application. If you want to ignore the latency spikes from GC pauses, then measure the median latency time since that is insensitive to the outlying spike latency times. If you want to factor in the spikes, then calculate the average latency time since the spike will pull up the average.

Upvotes: 1

Related Questions