高可用指系统的可用程度。没有100%的可用性。打个夸张的比方说,部署在全球的所有机房都同时停电了,那么系统就不能再提供服务。一般我们只需要做到4个9就已经很不错了,如下图:
![](http://upload-images.jianshu.io/upload_images/8723449-0573c87eb8676bef.png?imageMogr2/auto-orient/strip|imageView2/2/w/800/format/webp)
image.png
2、高可用分类
按照业务=逻辑+数据来分,高可用分为计算高可用和存储高可用,逻辑即数据,数据即存储。
2.1 计算高可用
常见的计算高可用架构分为主备、主从、对称集群、非对称集群。
主备:
![](http://upload-images.jianshu.io/upload_images/8723449-d63946b8c0494318.png?imageMogr2/auto-orient/strip|imageView2/2/w/547/format/webp)
image.png
主从:
![](http://upload-images.jianshu.io/upload_images/8723449-402e70c17d113b7b.png?imageMogr2/auto-orient/strip|imageView2/2/w/529/format/webp)
image.png
对称集群:
![](http://upload-images.jianshu.io/upload_images/8723449-5e2cb40f7138bdf5.png?imageMogr2/auto-orient/strip|imageView2/2/w/645/format/webp)
image.png
非对称集群:
![](http://upload-images.jianshu.io/upload_images/8723449-4df881b1157b3e3f.png?imageMogr2/auto-orient/strip|imageView2/2/w/670/format/webp)
image.png
2.2 存储高可用
常见的存储高可用有主备、主从、主备/主从切换,主主,集群(数据集中集群和数据分散集群),分区(洲际、国家、城市、同城分区)。
主备:
![](http://upload-images.jianshu.io/upload_images/8723449-d3915f80ff14c0dc.png?imageMogr2/auto-orient/strip|imageView2/2/w/1123/format/webp)
image.png
主从:
![](http://upload-images.jianshu.io/upload_images/8723449-eea98ec9a9017336.png?imageMogr2/auto-orient/strip|imageView2/2/w/1123/format/webp)
image.png
数据集中式集群:
![](http://upload-images.jianshu.io/upload_images/8723449-bf4a8ba4e1663aa9.png?imageMogr2/auto-orient/strip|imageView2/2/w/618/format/webp)
image.png
主主集群:
![](http://upload-images.jianshu.io/upload_images/8723449-a4a071b53baae04b.png?imageMogr2/auto-orient/strip|imageView2/2/w/338/format/webp)
image.png
数据分散集群:
比如HDFS的架构。
![](http://upload-images.jianshu.io/upload_images/8723449-bd01ad7a161a4d52.png?imageMogr2/auto-orient/strip|imageView2/2/w/435/format/webp)
image.png
作者:文竹小二
链接:https://www.jianshu.com/p/35e4c2db6fde
来源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。