一个问题,博客需不需要 Redis?

2016-09-25 13:53:25 +08:00
 lufficc

前几天写的laravel-blog被老外看到了,然后问我了一个问题:

Why do we need Redis for a blog system? If this is truly a fast blog it should be fast just using a database, no?

我简单回单了一句,为了缓存,提高速度,结果他不依不饶:

Depends on the use case. What are we caching? Indexed queries in a relational database are usually very fast. Adding Redis makes for a more complex stack so it must be motivated. Are we not just talking about saving lower single-digit milliseconds here? And to do that we add a hard dependence on Redis, making hosting more complex, error-prone and expensive. I love Redis and use it when it's appropriate. I also love relational databases because they solve complex use cases in a performant way. I asked why it is motivated to add Redis for a blog engine, and I just get a hand-wavy "for caching" as an answer. What do we need to cache and why can't that problem be solved without the need for a Redis cache?

回答了一长串,具体看这里:here 截图:.

所以到底要不要缓存,我该怎么回答?强大的 V 友帮帮我

12529 次点击
所在节点    程序员
104 条回复
zong400
2016-09-28 11:55:23 +08:00
不需要,我的 blog 就用 hexo
henryhuangs
2016-09-28 12:37:41 +08:00
太多余了,我不知道访问量要到什么地步你才用
abc123ccc
2016-12-19 09:19:42 +08:00
@kideny 我的小站也被攻击过,目前不知道是 3M 的流量攻击还是被拦截后的 3M 。目前运行稳定。
superlead
2017-04-20 14:12:38 +08:00
@mokeyjay 弱弱地问一下 这个爆炸是多爆炸?

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://tanronggui.xyz/t/308824

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX