摘要: 基础的Replica Set 由三个成员组成,提供了冗余和故障切换。根据应用需求设计Replica Set架构,尽量避免不必要的复杂化。 Strategies Deploy an Odd Number of members 奇数个成员存在确保复制集可以正确选举出主节点。如果副本集现有偶数个成员,请增加一个投票节点以保证其成员个数为奇数。投票节点由于不包含数据集,占用资源很少。所以可以将投票节... 阅读全文
posted @ 2015-10-14 16:10 hotbaby 阅读(159) 评论(0) 推荐(0) 编辑
摘要: 投票节点并不含有Replica Set数据集副本,且无法升级为主节点。复制集中可能有多个投票节点为选举主节点进行投票。投票节点可以是Replica Set 以偶数个节点存在,不用再为数据集增加新的节点。 Example: 以下复制集中,一个投票节点可以加入复制集中来实现选举过程中所需的偶数票: Security Authentication 如果开启了authorization,跳票... 阅读全文
posted @ 2015-10-13 14:35 hotbaby 阅读(283) 评论(0) 推荐(0) 编辑
摘要: Priority 0 Replica Set Members 一旦将优先级设置为0,那么从节点将不能升级为主节点。优先级为0的成员不会触发选举,除此之外,该节点与其他从节点没有区别,优先级为0的节点拥有和主节点一样的数据集,能接收读请求,同时参与投票。通过将从节点的优先级设置为0,来防止其升级为主节点可以在分布式数据中心的结构中起到很好的作用。 只有三个成员的数据集中,主节点和从节点坐落于一个... 阅读全文
posted @ 2015-10-13 11:05 hotbaby 阅读(265) 评论(0) 推荐(0) 编辑
摘要: Purpose of Replication Replication 为数据提供冗余的同时,也提高了数据高可用性。由于在不同数据库服务器上拥有多个数据镜像,Replication可以有效防止单台机器故障导致的数据丢失。 Replication 还可以提高读性能。客户端将读请求与写请求发到不同服务器上。还可以在其他数据中心建立复制节点做异地灾备,进一步提高可用性。 Replicat... 阅读全文
posted @ 2015-10-12 19:52 hotbaby 阅读(237) 评论(0) 推荐(0) 编辑
摘要: When deploying MongDB in production, you should have a strategy for capturing and restoring backups in the case of data loss events. There are several ways to back up MongoDB clusters. Backup by ... 阅读全文
posted @ 2015-10-12 19:29 hotbaby 阅读(248) 评论(0) 推荐(0) 编辑
摘要: 来源:http://doc.scrapy.org/en/latest/topics/architecture.htmlOverviewThe following diagram shows an overview of Scrapy architecture with its components ... 阅读全文
posted @ 2015-10-12 15:17 hotbaby 阅读(417) 评论(0) 推荐(0) 编辑
摘要: Model Data for Atomic Operations Pattern In mongoDB, write operations, eg. db.collection.update(), db.collection.findAndModify(), db.collection.remove(), are atomic on the level of a single document... 阅读全文
posted @ 2015-10-12 10:47 hotbaby 阅读(514) 评论(0) 推荐(0) 编辑
摘要: Model Tree Structures with Parent References Overview A tree-alike data model structure in mongo storing references to “parent”nodes in the child nodes. Pattern The Parent Reference pattern stores... 阅读全文
posted @ 2015-10-10 18:08 hotbaby 阅读(715) 评论(0) 推荐(0) 编辑
摘要: 文档模型关系 Model One-to-One Relationships with Embedded Documents Overview Data in MongoDB has a flexible schema. Collections do not enfoce document structure. Pattern In the normalized data mode... 阅读全文
posted @ 2015-10-10 16:29 hotbaby 阅读(271) 评论(0) 推荐(0) 编辑
摘要: 数据模型概念 Opeational Factors and Data Models lifecycle management indexing horizontal scalability docoument growth GridFS GridFS is a specification for... 阅读全文
posted @ 2015-10-10 15:30 hotbaby 阅读(303) 评论(0) 推荐(0) 编辑