Which side of CAP theorem Elasticsearch satisfy?

Hello Everyone,

I hope everyone is fine, I'm new to this Elasticsearch and I just wanted to know which side of CAP theorem Elasticsearch satisfy?.

I am very thankful to you.

Kind Regards,
adnan

The CAP theorem is a very specific theorem regarding a particular kind of distributed system called a linearizable register suffering from a network partition that could be pathologically badly behaved. Elasticsearch isn't normally used as a linearizable register, so the CAP theorem doesn't really apply. That said, Elasticsearch recently gained a feature that adds a compare-and-set operation and the work to verify that this has linearizable semantics is ongoing. In the face of a sufficiently bad network partition, compare-and-set operations in Elasticsearch would preserve consistency and sacrifice availability.

However, Brewer's conjecture is a more general statement about distributed systems that gave rise to the CAP theorem. It is interesting to ask about Elasticsearch's relationship with this conjecture.

In the face of a sufficiently bad network partition, write operations in Elasticsearch will generally prefer "consistency" over "availability", in the sense that acknowledged writes should never be lost but that some writes may go unacknowledged or may fail. Read operations (i.e. searches) offer stronger availability guarantees at the expense of some consistency, in the sense that a search may sometimes return older results rather than failing. This is normally an appropriate choice for search engines like Elasticsearch. There are mechanisms to prevent the results from being too old.

7 Likes

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.