Cache to NoSQL pattern
Cache serves data much faster than that being served from other data stores. But if the caching solution in use is giving data integrity problems, it is better to migrate to NoSQL data stores, such as Cassandra. Is Cassandra faster than in-memory caching solutions? The obvious answer is, "No". But it is not as bad as many think. Cassandra can be configured to serve faster reads, and the bonus comes in the form of high data integrity with strong replication capabilities. The Cassandra read path starts with the checking in of the bloom filter. It is a probabilistic method of seeing whether the requested data is present in a given SSTable or not, before getting into the I/O operations. If the bloom filter gives a favorable nod, the next step is to check in the partition key cache. If the key is found, the row is returned. If the key is not found, the SSTables are read, and when data is available, it is merged, sorted, and returned. There are ways to cache an...