Skip to Content
Dapr学习手册
book

Dapr学习手册

by Haishi Bai, Yaron Schneider
November 2021
Beginner to intermediate
239 pages
4h 15m
Chinese
China Electric Power Press Ltd.
Content preview from Dapr学习手册
状态
89
可用性上又增加了一个
9
”。假设有两台相同的服务器,每台服务器的可用
性都是
90%
。将它们加入到负载均衡器后,可用性为
99%
,而增加第三台服
务器,可用性为
99.9%
2.1.2.3 Serverless
既然最终处理请求的是哪台物理服务器并不重要,那么作为应用程序的编写
者不需要关心这些服务器在哪里以及如何托管。如果可以保证在任何时候都
能获得所需的计算和存储能力,那就根本不需要担心底层基础设施,这就是
无服务器(
serverless
)承诺的由来。为了以可持续的方式实现这一承诺,云
平台需要在其可用资源上高效地分配工作负载。正如我们稍后将看到的那样,
调度无状态服务比调度有状态服务要容易得多。因此,许多
serverless
平台只
支持无状态服务。
2.1.3
托管有状态服务的挑战
托管有状态服务带来了多个实际挑战。由于有状态服务在可能跨越多个请求
的事务中持有上下文信息,因此事务中的所有请求都需要由持有该上下文状
态的服务器处理,以确保一致性。这种约束为工作负载的调度带来额外的复
杂性,使得大规模托管有状态服务成为一项更加困难的任务。
2.1.3.1
有状态服务的可用性
当服务器发生故障时,它就会失去保存在内存中的上下文信息。即使服务器
将状态保存在本地磁盘上,当故障发生时,其他服务器也无法从那里检索状态。
为了保证有状态服务的可用性,必须将状态复制到多台服务器上,这样当一
台服务器发生故障时,其他服务器可以使用自己的状态副本继续进行交易。
为了实现这样的状态复制,我们需要解决几个问题。首先,我们需要找到一 ...
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

流畅的Python(第2版)

流畅的Python(第2版)

Luciano Ramalho
数据科学原理

数据科学原理

Posts & Telecom Press, Sinan Ozdemir
Python预测分析实战

Python预测分析实战

Posts & Telecom Press, Alvaro Fuentes
机器学习开发者指南

机器学习开发者指南

Posts & Telecom Press, Rodolfo Bonnin

Publisher Resources

ISBN: 9787519859367