Hi,
I just read [1] which describes a lease implementation using CAS
queries. It applies a TTL to the lease which needs to be refreshed
periodically by the lease holder.
I use such a pattern myself since a couple of years, so no surprise
there.
However, the article uses CAS queries not only for acquiring the lease,
but also for TTL updates and active lease canceling. Given a default TTL
of three minutes is described, the amount of CAS queries might be ok.
What if I go for much shorter TTLs, eg 5 seconds to minimise the time
another peer takes over if the current lease owner crashes or is
stopped? Using some safety margin for updating the TTL, we'd end up with
a CAS query every 3 seconds or so. If we have a bunch of such leases,
we'd likely see 10 or more such CAS queries a second.
I am looking for advice whether such a high number of CAS queries could
be tolerable at all? I'd assume there is not much contention on the same
lease, is the overhead of a CAS query basically that it leads to 4 or
sometimes significantly more 'queries' in the C* cluster?
IOW, suppose I
- have a cluster spanning geographic regions
- restrict the CAS queries to key spaces that are only replicated in a
single region and I use LOCAL_SERIAL CL
would 100 CAS queries per second that in the normal case do not conflict
(== work in different partition keys) be sort of 'ok'?
Or should it rather be in the range of 10/s?
Jan
[1] https://www.datastax.com/dev/blog/consensus-on-cassandra
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@cassandra.apache.org
For additional commands, e-mail: user-h...@cassandra.apache.org