client_throttling

package
v1.2.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 2, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultK = 2.0

Functions

func RejectionProbability

func RejectionProbability(requests int, accepts int, k float64) float64

RejectionProbability 客户端节流算法 requests 请求数量 应用层代码发出的所有请求的数量总计(指运行于自适应节流系统之上的应用代码 accepts 请求接受数量 后端任务接受的请求数量 k 倍值 降低倍值会使自适应节流算法更加激进 举例来说,假设将客户端请求的上限从request=2 * accepts调整为request=1.1* accepts,那么就意味着每10个后端请求之中只有1个会被拒绝

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL