SlideShare a Scribd company logo
1 of 44
Download to read offline
我们要解决什么问题?
• 2000万用户注册信息
• 2000万用户注册信息
• 每日新增10万
• 2000万用户注册信息
• 每日新增10万
• 一秒钟300并发
• 2000万用户注册信息
• 每日新增10万
• 一秒钟300并发
• 频繁的读取相同信息
• 2000万用户注册信息
• 每日新增10万
• 一秒钟300并发
• 频繁的读取相同信息
• 要求添加一个获取用户注册信息的模块
• 2000万用户注册信息
• 每日新增10万
• 一秒钟300并发
• 频繁的读取相同信息
• 要求添加一个获取用户注册信息的模块
• 对原来系统性能的影响尽量小
这和浏览器的SESSION有啥区别?
什么是SESSION?
如果我创建一个session
为什么不用传统数据库?
以下内容来自
维基百科
NoSQL = Not Only SQL ?
NoSQL = No relational SQL ?
NoSQL = Not SQL ?
NoSQL是一种提供
模型化(相对于格式化)
存储与解析的机制
驱动这种方式的原因包括
简化设计
横向缩放
更好的可用性控制
基于(键-值,图,文档)的数据结构
与关系型数据库有很大区别
所以有的操作的速度在两种结构中
会不一样
因为存在区别
一个特定NoSQL数据库的适用性与
其要解决的问题有很大关系
例如 有没有涉及图形算法
众多NoSQL数据库
已经在
大数据和实时应用场景
中体现出有效性和增长趋势
很多 NoSQL 为了
数据的可用性和可分块性
存储时会在兼容三范式理论
什么是三范式?
第一范式
第二范式
第三范式
很多 NoSQL 数据库缺少真正的
事务机制,即使少数近期出现的
系统支持
如FairCom,c-treeACE, Google
Spanner and FoundationDB
为啥选择MongoDB?
• 性能
memcache 可以胜任2000万
redis 有测试说在1000万左右时性能下降,分表后应该可以
mongodb 2000万没问题
• 操作的便利性
memcache 数据结构单一
redis 丰富一些,redis更好一些,较少的网络IO次数
mongodb 支持丰富的数据表达,索引,最类似关系型数据库
• 内存空间的大小和数据量的大小
redis 2.0版本增加了自己的VM特性,突破物理内存的限制
memcache 可以修改最大可用内存,采用LRU算法
mongoDB 依赖用操作系统VM做内存管理,吃内存也厉害,适合海量数据
• 可靠性(持久化,数据恢复)
redis 支持 - 快照、AOF
memcache 不支持,通常用在做缓存,提升性能;
MongoDB 从1.8版本开始采用binlog方式支持持久化的可靠性
• 性能
memcache 可以胜任2000万
redis 有测试说在1000万左右时性能下降,分表后应该可以
mongodb 2000万没问题
• 操作的便利性
memcache 数据结构单一
redis 丰富一些,redis更好一些,较少的网络IO次数
mongodb 支持丰富的数据表达,索引,最类似关系型数据库
• 内存空间的大小和数据量的大小
redis 2.0版本增加了自己的VM特性,突破物理内存的限制
memcache 可以修改最大可用内存,采用LRU算法
mongoDB 依赖用操作系统VM做内存管理,吃内存也厉害,适合海量数据
• 可靠性(持久化,数据恢复)
redis 支持 - 快照、AOF
memcache 不支持,通常用在做缓存,提升性能;
MongoDB 从1.8版本开始采用binlog方式支持持久化的可靠性
• 性能
memcache 可以胜任2000万
redis 有测试说在1000万左右时性能下降,分表后应该可以
mongodb 2000万没问题
• 操作的便利性
memcache 数据结构单一
redis 丰富一些,redis更好一些,较少的网络IO次数
mongodb 支持丰富的数据表达,索引,最类似关系型数据库
• 内存空间的大小和数据量的大小
redis 2.0版本增加了自己的VM特性,突破物理内存的限制
memcache 可以修改最大可用内存,采用LRU算法
mongoDB依赖用操作系统VM做内存管理,吃内存也厉害,适合海量数据
• 可靠性(持久化,数据恢复)
redis 支持 - 快照、AOF
memcache 不支持,通常用在做缓存,提升性能;
MongoDB 从1.8版本开始采用binlog方式支持持久化的可靠性
• 性能
memcache 可以胜任2000万
redis 有测试说在1000万左右时性能下降,分表后应该可以
mongodb 2000万没问题
• 操作的便利性
memcache 数据结构单一
redis 丰富一些,redis更好一些,较少的网络IO次数
mongodb 支持丰富的数据表达,索引,最类似关系型数据库
• 内存空间的大小和数据量的大小
redis 2.0版本增加了自己的VM特性,突破物理内存的限制
memcache 可以修改最大可用内存,采用LRU算法
mongoDB 依赖用操作系统VM做内存管理,吃内存也厉害,适合海量数据
• 可靠性(持久化,数据恢复)
redis 支持 - 快照、AOF
memcache 不支持,通常用在做缓存,提升性能;
MongoDB从1.8版本开始采用binlog方式支持持久化的可靠性
最后搞出来的东西
有没有什么感想?

More Related Content

Featured

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Featured (20)

Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 

Isess show