简体   繁体   中英

Key-value store as primary database

I am about to start a project where read and writes will be large and frequent, Thereby looking around I found that in-memory databases are made exactly for that purposes itself. Investigating a little more took me to redis.

Redis seems pretty cool(Just started reading, alot to know about it though). But I have primarily seen only relational databases and think of data in term of tuples and relations (I think this I can learn with time).

I have following questions right now:

  1. Can I use only redis to store my data ?
    • Reason why I am asking is that every article I have seen use Redis/memcached as an intermediate layer for caching.
    • Can I just rely on redis to persist my data through out ?
  2. Where to host/run redis database ?
    • Since Redis is an in-memory database, its requirement of host will definitely be different than applications that require more processing. Hosts which have more RAM will definitely be better here.
    • So where do people normally go on to host their database ?
    • Elasticcaching from AWS, can this be used to host redis(as a primary database, not just caching layer)
  3. Any resources ?
    • I always ask this, I found lots of good documents online, but nothing really good to start with. Please share any good resource if you are aware of.

Can I use only redis to store my data ?

It depends on your requirements but with 150+ NoSQL database available, I suspect redis is not your only option.

Reason why I am asking is that every article I have seen use Redis/memcached as an intermediate layer for caching.

It is faster than JDBC, but do you need it to be faster?

Can I just rely on redis to persist my data through out ?

You could, it depends on your reliability requirements. eg some organisations only trust traditional RDBMS databases. Note: you need to have redis on multiple servers to pretect against a failure.

Where to host/run redis database ?

Wherever you like.

Since Redis is an in-memory database, its requirement of host will definitely be different than applications that require more processing. Hosts which have more RAM will definitely be better here.

I would normally put a NoSQL instance on the same machine. The amount of RAM you give it depends on how much data you need.

So where do people normally go on to host their database ?

Across multiple servers for redundacy, they can be shared with the applications.

Elasticcaching from AWS, can this be used to host redis(as a primary database, not just caching layer) Any resources ?

I would ask them.

I always ask this, I found lots of good documents online, but nothing really good to start with. Please share any good resource if you are aware of.

There is no one resource as there is no one answer. If there was, there would be 150+ NoSQL databases.

Disclaimer: I have work another NoSQL key-value store which is persisted as well as in memory and is dramatically faster (if you need that sort of thing) It is also simpler to use/deploy. https://github.com/OpenHFT/Chronicle-Map

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM