Skip to Content
Web容量规划之美
book

Web容量规划之美

by Arun Kejariwal, John Allspaw
August 2019
Beginner to intermediate
232 pages
3h 50m
Chinese
China Electric Power Press Ltd.
Content preview from Web容量规划之美
50
2
该服务器需要用来处理消耗很多
CPU
的工作吗?它需要执行消耗很多内存的工作
吗?对网络有很高的要求吗?
现在,水平和垂直比例架构之间的差异在业界是众所周知的,但为了将容量规划
放到上下文中(见图
2-5
),值得回顾一下:
能够水平扩展意味着有一个架构,只要在现有的基础设施中添加类似的功能节
点,就可以增加容量。例如,多加一个
Web
服务器分担网站访问的负担。在
水平扩展的情况下,只需要处理服务瓶颈所需的资源就需要进行扩展。水平扩
展是微服务架构的典型选择。
能够垂直扩展是指一种通过增加服务器内部的资源(例如
CPU
、内存、磁盘和
网络)来增加容量的能力。在集中部署体系结构中,垂直扩展是典型的选择。
2
-
5
:垂直与水平扩展图
随着分层架构和无共享架构的出现,作为网络应用横向扩展以其相对水平扩展的
优势受到更广泛的认可。能够横向扩展意味着设计你的应用来处理不同层次的数
据库抽象和分布。你可以在
Henderson
Schlossnagle
的书中找到很多关于横向扩
展应用程序开发技术的好方法。
仅仅依靠垂直扩展的弊端在于,随着你对计算机的各个部分进行升级的同时成本
显著上升。同时给你带来了单点故障的风险(
SPOF
)。当扩展服务器群的服务器
规模的时候,水平扩展涉及增加潜在故障点的更复杂的问题。此外,对于各个节
点之间的数据同步,也无疑带来了一些挑战。例如,在分布式数据库或分布式仓
51
设定容量目标
库中保证强一致性需要各个节点之间的同步。同样在多线程执行的上下文中,常
常需要线程同步来保证正确性。
对角线扩展(由 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

GPT-3

GPT-3

Sandra Kublik, Shubham Saboo

Publisher Resources

ISBN: 9787519831073