RAM storage costs many times what hard disc storage does.
Wouldn't that make storing data in Redis many times more expensive than if you used MongoDB or mySQL?
RAM storage costs many times what hard disc storage does.
Wouldn't that make storing data in Redis many times more expensive than if you used MongoDB or mySQL?
RAM can be expensive. Flash is 10-20x cheaper than RAM. Redis Labs has a solution that extend Redis RAM onto Flash/SSD storage and present RAM+Flash as RAM to Redis (I am oversimplifying but that's basically it). More info here on Redis Flash.
One thing to note here: Extending RAM is different in a few ways compared to disk based systems you mention like MongoDB or MySQL.
1- Hot values in ram don't need to be persisted to disk. If you have multiple writes to the same key, the IOPS is much lower.
2- RAM-extension writes are cheaper than durable writes. Durable writes require things like redo logs or write ahead logs. RAM extensions don't need that.
3- Data size on flash is smaller. We don't need to write the data in RAM into flash if you don't enable persistence. (by the way, on redis durability can be done through disk persistence as an option but many use replication as durability, maintain multiple redundant copies and distribute across geos.)
Disclosure: I work for Redis Labs
Yes, It is expensive. Redis is mostly used to implement cache which are supposed to be faster than the primary data-store. As it is used as cache, we can have this trade off of price vs speed.
For more information on Redis and other data stores, you can refer to this answer