53

BASE stands for 'Basically Available, Soft state, Eventually consistent'

So, I've come this far: "Basically Available: the system is available, but not necessarily all items in it at any given point in time" and "Eventually Consistent: after a certain time all nodes are consistent, but at any given time this might not be the case" (please correct me if I'm wrong).

But, what is meant exactly by 'Soft State'? I haven't been able to find any decent explanations on the internet yet.

1

4 Answers 4

37

This page (originally here, now available only from the web archive) may help:

[soft state] is information (state) the user put into the system that will go away if the user doesn't maintain it. Stated another way, the information will expire unless it is refreshed.

By contrast, the position of a typical simple light-switch is "hard-state". If you flip it up, it will stay up, possibly forever. It will only change back to down when you (or some other user) explicitly comes back to manipulate it.

The BASE acronym is a bit contrived, and most NoSQL stores don't actually require data to be refreshed in this way. There's another explanation suggesting that soft-state means that the system will change state without user intervention due to eventual consistency (but then the soft-state part of the acronym is redundant).

There are some specific usages where state must indeed be refreshed by the user; for example, in the Cassandra NoSQL database, one can give all rows a time-to-live to make them completely soft-state (they will expire unless refreshed), but this is an unusual mode of usage (a transient cache, essentially).

"Soft-state" might also apply to the gossip protocol within Cassandra; a new node can determine the state of the cluster from the gossip messages it receives, and this cluster state must be constantly refreshed to detect unresponsive nodes.

5
  • In case of Cassandra it should be TTL on column, right? It means that not all data will expiry automatically, but that there is possibility to set expiration time on data - is that correct? Commented Jan 10, 2012 at 7:44
  • 3
    The BASE acronym is a bit contrived, and most NoSQL stores don't actually require data to be refreshed in this way. There's another explanation at stackoverflow.com/questions/3342497/… suggesting that soft-state means that the system will change state without user intervention due to eventual consistency (but then the soft-state part of the acronym is redundant). As you say, one can set up Cassandra with TTL to make it completely soft-state, but this is an unusual mode of usage (a transient cache, essentially).
    – DNA
    Commented Jan 11, 2012 at 9:17
  • 1
    "Soft-state" might also apply to the gossip protocol within Cassandra; a new node can determine the state of the cluster from the gossip messages it receives, and this cluster state must be constantly refreshed to detect unresponsive nodes.
    – DNA
    Commented Jan 11, 2012 at 13:09
  • The link is dead :( Fortunately, it's in the Web Archive: web.archive.org/web/20120630030359/http://www.tekelec.com/…
    – Bolo
    Commented May 2, 2014 at 22:54
  • According to this Soft-state definition on Wikipedia, Soft-state and Eventually consistent are not redundant. Soft-state means the data that we read might not be the latest. This is the cons of Basically Available. Commented Jan 10, 2023 at 10:57
10

I was taught in classes that "Soft state" means that the state of the system could change over time (even during times without input), because there may be changes going on due to "eventual consistency". That's why says "soft" state.

Some source: link

1
  • 1
    so even though no writes are happening at the moment to any nodes, some previous writes might still be propagating from some node to the rest of them, so the system is in a soft state: reading from say node X where propagation has not yet happened will end up in a response with inconsistent data while reading from node Y where propagation did happen would return consistent data; eventual consistency guarantees that at some point all nodes will keep up with the changes Commented Nov 28, 2022 at 7:17
5

Soft state means data that is not persisted on the disk, yet in case of failure it could be possible to restore it (e.g. recreate a lower quality image from a high quality one). A good article that addresses this and other interesting issues is Cluster-Based Scalable Network Services

3

A BASE system gives up on consistency to improve the performance of the database. Hence most of the famous NoSQL databases are highly available and scalable than ACID-compliant relational databases.

Soft state indicates that the state of the system may change over time, even without input. This is because of the eventual consistency model. Eventual consistency indicates that the system will become consistent over time.

For example, Consider two systems such as A and B. If a user writes data to a system A, there will be some delay in reflecting these written data to B usually within milliseconds(depending upon the network speed and the design for syncing).

2
  • 2
    I'm not sure I agree on the "more powerful" part, since it all depends on the scenario. They might be more performant in certain cases by giving up ACID compliance. Commented Dec 12, 2017 at 9:18
  • Yes, it depends upon machines and the applications running. But BASE systems generally have multiple writes simultaneously due to its multi-system approaches. Whereas in ACID compliant system, single writes is possible.
    – srth12
    Commented Dec 4, 2018 at 13:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.