最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

【整理】mongo和redis对比

redis crifan 2030浏览 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,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
82 queries in 0.191 seconds, using 22.10MB memory