TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Redis as the primary data store

106 pointsby courtneycouch0about 12 years ago

16 comments

macspoofingabout 12 years ago
Total overkill, especially given that replicated RAM storage is quite pricey when compared to traditional alternatives. Ideally, you just use Redis to store (<i>cough</i> cache <i>cough</i>) latest forum threads/comments and have everything else on disk (maybe in a RDBMS?). You get performance and price.<p>EDIT:<p>&#62;Another of those tricks has to do with the fact that nearly half of our code is also written in LUA running directly on Redis.<p>Urgh. Ugly.
评论 #5514121 未加载
评论 #5516581 未加载
rb2k_about 12 years ago
&#62; The API servers that we are able to push this load with cost a mere $90/month<p>That would be about an EC2 m1.medium<p>It would be interesting to see how much it costs to run the whole cluster. I'd also love to know which part of the redis featureset they really use. Redis is great, but I think a lot of other database backends will give comparable performance when allowed to store all their data in RAM (MongoDB, Postgres, Riak, Cassandra, ...). The advantage of these (especially Riak/Cassandra) would be that for pure key/value semantics, they take care of all of the annoying operations overhead like rolling updates.
评论 #5513912 未加载
roskilliabout 12 years ago
I'd be really interested in seeing if you benchmarked fsync at every query vs your fsync every second policy.<p>My main beef with fsync every second is just that you will never, ever get a "this is what the server looked like when it went down". If the fsync at every query was only worse by a relatively small factor, and if you used write transactions for the majority of your writes (meaning fewer times needed to fsync for every query) which I'm guessing you are to protect integrity on writes, I don't see why this wouldn't be more appealing than fsync at every second?
评论 #5512490 未加载
评论 #5511950 未加载
aphyrabout 12 years ago
<i>If you are envisioning network partition scenarios where perhaps the master is isolated from the slaves, this is minimized by replication checks to slaves (set an arbitrary key to an arbitrary value and check if the slaves update). If a master is isolated we block writes: Consistent and Partition tolerant at the cost of Availability.</i><p>Could you describe these checks in more detail, please?
评论 #5512204 未加载
davecap1about 12 years ago
I've been using Redis Cloud by Garantia Data for the past few months. They have automated infrastructure for (what I assume are) sharded Redis DBs, and they have a super reasonable pay-as-you-grow plan. <a href="http://redis-cloud.com/" rel="nofollow">http://redis-cloud.com/</a><p>They claim to support Redis DBs of "unlimited size"... until they run out of ram in the cloud :)
sehuggabout 12 years ago
We've been using Redis as a primary data store for about two years, and it works great. We have a simple master-slave config and do periodic RDB snapshots -- no EBS. We manually failover from master to slave, but in practice this is rarely necessary (our current master has been up for 9 months).
评论 #5513109 未加载
raverbashingabout 12 years ago
Redis as primary data source? Good<p>If it fits your ram of course (and no, swap space is not RAM, just don't)<p>But you can organize yourself, putting bigger data in the FS for example, and it should be ok.<p>The only issue with Redis is that it's much 'lower level' than other DBs so don't expect to do a 'SELECT * where condition' out of the box.
评论 #5513355 未加载
DoubleClusterabout 12 years ago
How much does maintaining this infrastructure cost? I'd guess that spending a bit more on (virtual) hardware would have been a much cheaper solution. Only when the service proves to be popular and you want to save money you should invest in an architecture like this.
评论 #5511986 未加载
devdabout 12 years ago
How do you delete data from redis ? Eg. Let's say that a customer no longer wants an account, and you want to delete all the keys related to an account. Do you manually write delete key statements ?
评论 #5513682 未加载
yyquxabout 12 years ago
I wonder how this will work long-term as you accumulate an archive of old rarely-accessed data.
评论 #5514012 未加载
jamescunabout 12 years ago
If the dataset fits in ram, doesn't need advanced querying and there is a certain level of guaranteed persistence, then why not?
评论 #5512757 未加载
dev360about 12 years ago
Interesting. How do you rebalance your shards in the event that a new server is added to the keyring and your keys shift?
rustyrazorbladeabout 12 years ago
I built out a connection pool for the Python redis client for these types of setups where you'd want master / slave failover. It's meant to be paired with something like sentinel or custom failover scripts. <a href="https://github.com/StartTheShift/jondis" rel="nofollow">https://github.com/StartTheShift/jondis</a>
luser001about 12 years ago
Can anybody explain if SSDs would have worked for this case?
评论 #5512569 未加载
mjsabout 12 years ago
Interesting, this is the first technology blog-like site I've seen that does not have an RSS feed...
评论 #5524102 未加载
sebastianavinaabout 12 years ago
talk about abusing a platform