V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
lufficc
V2EX  ›  程序员

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

  •  
  •   lufficc ·
    lufficc · 2016-09-25 13:53:25 +08:00 · 12371 次点击
    这是一个创建于 2983 天前的主题,其中的信息可能已经有所发展或是发生改变。

    前几天写的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 友帮帮我

    104 条回复    2017-04-20 14:12:38 +08:00
    1  2  
    zong400
        101
    zong400  
       2016-09-28 11:55:23 +08:00
    不需要,我的 blog 就用 hexo
    henryhuangs
        102
    henryhuangs  
       2016-09-28 12:37:41 +08:00
    太多余了,我不知道访问量要到什么地步你才用
    abc123ccc
        103
    abc123ccc  
       2016-12-19 09:19:42 +08:00
    @kideny 我的小站也被攻击过,目前不知道是 3M 的流量攻击还是被拦截后的 3M 。目前运行稳定。
    superlead
        104
    superlead  
       2017-04-20 14:12:38 +08:00
    @mokeyjay 弱弱地问一下 这个爆炸是多爆炸?
    1  2  
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1867 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 16:25 · PVG 00:25 · LAX 08:25 · JFK 11:25
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.