From d36f1a0d72b6999d313c125a924e190147fb640b Mon Sep 17 00:00:00 2001 From: Jonas Kaninda Date: Thu, 14 Nov 2024 15:18:39 +0100 Subject: [PATCH] docs: update configuration deployment --- README.md | 2 +- docs/index.md | 2 ++ docs/quickstart/distrubuted-intance.md | 29 ++++++++++++++++++++++++++ examples/configMap.yaml | 6 +++++- examples/goma.yml | 4 ++++ 5 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 docs/quickstart/distrubuted-intance.md diff --git a/README.md b/README.md index bbb48ed..0ea19e1 100644 --- a/README.md +++ b/README.md @@ -56,10 +56,10 @@ It's designed to be straightforward and efficient, offering features, like: - OAuth - Rate limiting, In-Memory client IP based - Limit HTTP methods allowed for a particular route. +- Distributed rate limiting, client IP based using Redis ### Todo: - [ ] Blocklist IP address middleware - - [ ] Distributed Rate Limiting for In-Memory client IP based across multiple instances using Redis ---- diff --git a/docs/index.md b/docs/index.md index 6af25e4..839daec 100644 --- a/docs/index.md +++ b/docs/index.md @@ -33,6 +33,8 @@ It's designed to be straightforward and efficient, offering features, like: - OAuth - Rate limiting, In-Memory client IP based - Limit HTTP methods allowed for a particular route. +- Distributed rate limiting, client IP based using Redis + Declare your routes and middlewares as code. diff --git a/docs/quickstart/distrubuted-intance.md b/docs/quickstart/distrubuted-intance.md new file mode 100644 index 0000000..e798575 --- /dev/null +++ b/docs/quickstart/distrubuted-intance.md @@ -0,0 +1,29 @@ +--- +title: Distributed instances +layout: default +parent: Quickstart +nav_order: 5 +--- + + +# Distributed instances + +```yaml +version: "1.0" +gateway: + sslCertFile: cert.pem + sslKeyFile: key.pem + writeTimeout: 15 + readTimeout: 15 + idleTimeout: 30 + rateLimit: 60 # peer minute + blockCommonExploits: false + accessLog: /dev/Stdout + errorLog: /dev/stderr + logLevel: '' + ## Redis connexion for distributed rate limiting; when using multiple instances | It's optional + redis: + addr: redis:6379 + password: password +``` + diff --git a/examples/configMap.yaml b/examples/configMap.yaml index 70e1b40..293a758 100644 --- a/examples/configMap.yaml +++ b/examples/configMap.yaml @@ -4,7 +4,7 @@ metadata: name: goma-config data: goma.yml: | - # Goma Gateway configurations + # Goma Gateway configurations version: 1.0 gateway: # Proxy write timeout @@ -22,6 +22,10 @@ data: logLevel: info # debug, trace, off accessLog: "/dev/Stdout" errorLog: "/dev/stderr" + ## Redis connexion for distributed rate limiting, when using multiple instances | It's optional + #redis: + #addr: redis:6379 + # password: password ## Enable, disable routes health check disableHealthCheckStatus: false ## Returns backend route healthcheck errors diff --git a/examples/goma.yml b/examples/goma.yml index b41ef31..abf3181 100644 --- a/examples/goma.yml +++ b/examples/goma.yml @@ -16,6 +16,10 @@ gateway: logLevel: info # debug, trace, off accessLog: "/dev/Stdout" errorLog: "/dev/stderr" + ## Redis connexion for distributed rate limiting, when using multiple instances | It's optional + #redis: + #addr: redis:6379 + # password: password ## Enable, disable routes health check disableHealthCheckStatus: false ## Returns backend route healthcheck errors