Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2020-10-20 13:26:29 +0300
committerKamil Trzciński <ayufan@ayufan.eu>2020-10-20 13:26:29 +0300
commit7f8e9bd39def730616a4c7d1d5f00ee6ca9ea76a (patch)
tree455beeb7ac317059afcad0167bcba4a23ea1aec7 /app_config.go
parent9cf62c0fc1f31a6e175bb3e8b2321ca19584dee3 (diff)
Add Host and SNI-based rate limiting
This adds a per-process rate limiting of the incoming requests and connections. This assume two: - Requests generate a pressure on Object Storage - New TLS connections generate a pressure on CPU due to TLS handshake (generating and exchanging asymmetric keys)
Diffstat (limited to 'app_config.go')
-rw-r--r--app_config.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/app_config.go b/app_config.go
index 3bc2197b..96dd8f92 100644
--- a/app_config.go
+++ b/app_config.go
@@ -10,6 +10,12 @@ type appConfig struct {
RootKey []byte
MaxConns int
+ HostRateLimit uint
+ HostRateLimitWindow time.Duration
+
+ TLSSNIRateLimit uint
+ TLSSNIRateLimitWindow time.Duration
+
ListenHTTP []uintptr
ListenHTTPS []uintptr
ListenProxy []uintptr