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学习手册
安全
145
sidecar
架构中,
sidecar
和它所依附的应用程序处于同一个安全域中,在这
个安全域中,它们可以以纯文本的方式相互通信。然而,我们从客户那里了
解到,他们希望在
Dapr sidecar
和应用程序之间使用安全通道进行深度保护。
这是有意义的,因为
Dapr sidecar
也可以作为一个独立的进程工作。在撰写
本书时,此功能已经列入路线图,请参考在线文档以获取更新。
4.1.4
入侵与异常检测
尽管
Dapr
没有开箱即用的入侵或异常检测功能,但与此类系统集成并不是一
个遥不可及的目标。例如,自定义
Dapr
中间件可以向基于机器学习的异常检
测系统发送数据包副本,用于训练和推理目的,并且可以透明地完成,而不
会干扰应用程序本身。
Dapr
确实提供了主动的速率限制,以避免过多的服务调用。这是通过一个社
区贡献的中间件完成的。该实现使用
Tollbooth (
https://oreil.ly/40fJO
)
,这是
一个
HTTP
请求限速的通用中间件,基于
Token Bucket
算法。该算法以固定
的速率将令牌放入虚拟桶中。每个请求都会消耗一定数量的令牌,与消息大
小成正比。当请求进来时,如果存储桶中有足够的令牌可以
“消耗”
在请求
上,则请求通过。否则,请求将被拒绝。当请求被拒绝时,响应将包含标头,
例如保存最大请求限制的
X-Rate-Limit-Limit
和保存速率限制器持续时间的
X-Rate-Limit-Duration
。这些都是给客户机的信号,让客户机放弃请求。 ...
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