News for hackers. Stuff that matters.
Re:How to build a HackerNews Clone using Redis by friedman23 on Friday December 03, 2021 @12:01PM (#29432232)
Can someone speak more to this? I've also seen it stated that it's possible to use redis for durable data storage, is that really the case? What do you lose out on?
Re:How to build a HackerNews Clone using Redis by Eikon on Friday December 03, 2021 @12:19PM (#29432478)
From my experience it works pretty well, the issue is that the idea that it's temporary storage is so prevalent that I wouldn't risk it.

From what I saw, people think two times before doing `truncate table` but not that much with `FLUSHALL` in redis...

Also, I don't really see where the usecase would be as a permanent datastore compared to something like postgres.

Re:How to build a HackerNews Clone using Redis by tyingq on Friday December 03, 2021 @12:06PM (#29432292)
They have two different approaches to persistence, with different tradeoffs: https://redis.io/topics/persistence

Either would have the generic disadvantages of:

- Dataset can't exceed available memory

- The general disadvantages of NoSQL vs SQL around queries, transactions, etc, if you're expecting relational type functionality

Re:How to build a HackerNews Clone using Redis by sudo-it-all on Friday December 03, 2021 @12:28PM (#29432591)
Redis supports clustering and sharding: https://redis.io/topics/cluster-tutorial

There are also managed solutions that implement Redis with partial flash storage. Redis Enterprise and AWS ElastiCache both do this.

Re:How to build a HackerNews Clone using Redis by Raed667 on Friday December 03, 2021 @12:10PM (#29432349)
> Dataset can't exceed available memory

From my understanding, they do support sharding

Re:How to build a HackerNews Clone using Redis by tyingq on Friday December 03, 2021 @01:19PM (#29433227)
Sure, but still limited to the total amount of memory of all machines. You can't page in/out from storage.
Re:How to build a HackerNews Clone using Redis by node-bayarea on Friday December 03, 2021 @05:30PM (#29436434)
You can store Terabytes of data in Redis. Just google it.
Re:How to build a HackerNews Clone using Redis by tyingq on Friday December 03, 2021 @06:04PM (#29436740)
Yes, in Terabytes of RAM, or some separate commercial offering with flash. Not sure I get your point.
Re:How to build a HackerNews Clone using Redis by remote-dev on Friday December 03, 2021 @12:33PM (#29432652)
I have found this to be useful: https://github.com/fpereiro/backendlore

It is more about writing backends generally, but in it he uses Redis as a primary database and walks through durability and scalability.