4 ms·
While Redis needs to keep the dataset in memory (which is why I added that it kind of depends on the size of your stuff) it does have quite robust persistence f
by lgl 6y ago
While Redis needs to keep the dataset in memory (which is why I added that it kind of depends on the size of your stuff) it does have quite robust persistence features [0] so it's very unlikely you'll ever lose your data even across reboots or crashes if it's configured correctly.
That being said, it's still not really a database engine on itself and would also require a slight paradigm change on how you think about your data and how you create your schema so ymmv. But I've personally used it across a few non-data-heavy projects as primary datasource and have been quite happy with it. It was also famously used as primary datasource for a well known adult website generating 200M pageviews/day even back in 2012 [1] [2] although I don't know if that is still the case.
[0] https://redis.io/topics/persistence https://redis.io/topics/persistence
[1] http://highscalability.com/blog/2012/4/2/youporn-targeting-200-million-views-a-day-and-beyond.html http://highscalability.com/blog/2012/4/2/youporn-targeting-2...
[2] https://news.ycombinator.com/item?id=3597891 https://news.ycombinator.com/item?id=3597891
- pier25 6y agoThanks for the info. I'm already using Cloudflare Workers so it would make more sense to simply use Workers KV instead of Redis which are stored at the edge: Heroku Redis: - $15 per month - 50MB of memory - 40 connections limit Workers KV: - $5 per month - 1GB of storage (then $0.5 per GB) - 10M reads (then $0.5 per 1M reads) - Unlimited connections (via API or REST)
- lgl 6y agoYes that will probably be better in your case. I'm sorry I didn't really notice your other replies stating that you wish to go fully serverless. On a side note, for the $15 a month Heroku charges for a 50MB Redis (wtf?) one could, for example, get a 4vCPU/8GB/160SSD server on Hetzner cloud with 20TB of traffic or multiple smaller servers and have a much better infrastructure and room to grow without any added costs. Oh well, I guess "managed" is where the big bucks are :) /rant
- pier25 6y agoNo worries. I wish I could manage a VPS. I've dabbled with DO et al but I wouldn't sleep at night having a self configured VPS in production.
- lgl 6y agoYeah I get that, it does take a bit of work and time to learn and get used or comfortable with this stuff which a lot of the times could be better spent building or promoting your app and then just hire someone in the future to deal with that if needed. Being used to configure my own servers with relatively low traffic/processing needs on the cheap, I just get weirded out sometimes by the very expensive nature of these managed services like heroku, aws, etc and their "charge for every little thing" mentality. Still, the "elastic" functionalities and auto growth features they offer are usually pretty awesome and not trivial to setup on a VPS so it's a great and worry free option in that regard. Hope you can find the right solution for your case, good luck :)
- pier25 6y agoGood luck to you too kind stranger!