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容量规划之美
83
测量
容量的单位
到达某种我们在图中不会遇到的值(可能不安全)时,我们有十足的把握,我们
CPU
容量是足够的。
但是,这完全是一个假设。让我们通过另外一种形式的容量规划来确认它:受控
的负载测试。
在负载均衡的环境下找到 Web 服务器的上限
捕获
Web
服务器资源的上限可以由至少一个你可能的设计来决定:使用负载均衡
服务。为了确定服务承载真实流量的上限,通过从现有负载均衡池中“撤”服务
器的方式来增加生产环境负载(例如调整
HAProxy
的权重),这就增加了剩余服
务器上的负载,仔细研究这些服务器并测量它对资源的影响。我们要强调使用真
实流量,而不是运行仿真模型或试图对
Web
服务器资源在一个类基准的环境里建
模的重要性。
我们模拟的负载均衡测试验证了我们在前面章节中所做出的假设,即:
CPU
使用
与忙碌
Apache
进程之间的关系保持(大致)不变。图
3-9
描述了活动的
Apache
进程的增长及其相应的
CPU
使用率的增加,它由一台
Web
服务器在其每日的高峰
和低谷之间通过
RRD
生成,按总
CPU
增长排列。它确认了
CPU
使用量确实随着
繁忙的
Apache
进程数目增提升,至少在
CPU
40%~90%
之间是这样的情况。
这表明,在当前环境中使用
CPU
作为
Web
服务器上的容量的单个度量指标是安全
的。此外,它直接与
Web
服务器的工作相关,而且将来很有希望与网站流量相关。
基于此信息,我们设置当前总
CPU
的上限为
85%
,它有足够余量处理偶尔的峰值,
同时还能有效利用服务器。
84
3
3
-
9
:总的 CPU 与繁忙的 Apache ...
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