数据库 BASE理论

一、 BASE

BASE就是为了解决关系数据库强一致性引起的问题而引起的可用性降低而提出的解决方案。

 

BASE中 :

BA 是 Basically Available (基本可用)

基本可用是指分布式系统在出现不可预知故障的时候,允许损失部分可用性
可以理解为在一个平台中,假设部分出现故障,这个时候系统应该在允许这些故障出现的情况下依旧保持部分功能(应该是核心功能)可以正常使用,另一部分功能出现些许可以允许的问题。

  • 响应时间上的损失:正常情况下的搜索引擎0.5秒即返回给用户结果,而基本可用看的搜索结果可能要1秒,2秒甚至3秒(超过3秒用户就接受不了了)
  • 功能上的损失:在一个电商网站上,正常情况下,用户可以顺利完成每一笔订单,但是到了促销时间,可能为了应对并发,保护购物系统的稳定性,部分用户会被引导到一个降级页面


 

S 是Soft state(软状态

软状态,允许部分节点的数据存在一定的延时,这个延时不影响可用性。
举个例子,就是一个集群中,需要保持所有节点的数据时时刻刻都一致,这是一种强一致性的要求,这个很有可能会造成可用性的问题。
在保证了可用性的的前提下,允许各个节点在数据的一致性操作的时候有一定的延时。

 

软状态是相对原子性来说的

  • 原子性(硬状态) -> 要求多个节点的数据副本都是一致的,这是一种"硬状态"
  • 软状态(弱状态) -> 允许系统中的数据存在中间状态,并认为该状态不影响系统的整体可用性,即允许系统在多个不同节点的数据副本存在数据延迟

 

 

E 是Eventually consistent(最终一致性

最终一致性很好理解,软状态允许有一定延时,所以这个最终一致含义就是在一定的延时过去之后,所有节点的数据必须保持一致。
相比的假如在更新的同时,所有节点都必须查询到最新的数据,这样的话是一种 强一致性 。
在更新的同时,可以容忍节点查询到的数据不是最新的那么是一种 弱一致性

最终一致性根据更新数据后各进程访问到数据的时间和方式的不同可以分类为:

 

二、ACID和BASE的区别


BASE理论首先对于CAP的一种适应妥协和弱化,为了保证可用性,对一致性作出的一些削弱,所以呢可以说BASE是一种反ACID的理论。

 

  • ACID是传统数据库常用的设计理念, 追求强一致性模型。
  • BASE支持的是大型分布式系统,提出通过牺牲强一致性获得高可用性。

 

 

 

 

https://blog.csdn.net/crazyhsf/article/details/83352421

https://blog.csdn.net/jarniyy/article/details/93710088

README FOR INTERBASE 5.6 Online documentation and Release Notes For a description of new features and changes in InterBase 5.6, use Acrobat Reader to view the ReleaseNotes.pdf file. In addition, the complete 5-volume document set for InterBase 5.5 is available in PDF format with InterBase 5.6. Use Adobe Acrobat Reader 3 to view these PDF files. To take advantage of the full-search indexing for the document set, you need Acrobat Reader 3.0.1 (or later) With Search. This version of Reader is included on your InterBase 5.6 CD-ROM. You can also download it from http://www.adobe.com/prodindex/acrobat/readstep.html If you go directly to this Adobe site, be sure to download the version "With Search", not the plain version. ACCESSING THE DOCUMENT SET: You can open any of the books directly from the InterBase folder in the Start menu if you have Acrobat Reader already installed and the PDF extension is associated with Acrobat Reader. To access the books from the Help menu in Server Manager, choose InterBase Help and choose the book you want from the "InterBase Books Online" section. ________________________ Uninstalling InterBase 5.6 The Windows InterBase installation allows you to choose between performing a complete install or selecting individual components. If you install a subset of the components, you can run the install again later to add more components. However, when you uninstall, only the components that you installed the last time are removed. ------------------------------------- Copyright (c) 1999 Inprise Corp. All rights reserved.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

软件工程小施同学

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值