最新消息:VPS服务器又从fzhost.net换回Linode了,主题仍用朋友推荐的大前端D8

【整理】mongo和redis对比

redis crifan 194浏览 0评论

mongo vs redis

Redis vs Mongo – 简书

MongoDB vs. Redis Comparison

architecture – When to Redis? When to MongoDB? – Stack Overflow

caching – Is Redis just a cache? – Stack Overflow

Redis as the primary data store? WTF?!

  • Redis is based on key-value pair

    • save to:memory

      • fast

      • not reliable

    • List, HashMap,List 构成的 distributed database

    • 结构和关系:

      • based on key-value pair

      • database

        • table

          • tuple: tuple has strict schema limit

  • Mongo is based on document

    • save to:disk

      • not so fast

      • reliable

    • 结构和关系:

      • based on document

      • database

        • collection

          • document: document is schemaless

结论:

  • 如果优先考虑性能,且需要和有意愿花时间在性能优化上,那么用:Redis

  • 如果是搭建原型且不需要太操心数据库的话,用:MongoDB

转载请注明:在路上 » 【整理】mongo和redis对比

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
60 queries in 0.235 seconds, using 12.02MB memory