Skip to content

Commit

Permalink
add rate-limit to RPCs
Browse files Browse the repository at this point in the history
  • Loading branch information
DaMandal0rian committed Aug 1, 2024
1 parent 1ec6923 commit bc390f4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion templates/scripts/create_domain_node_compose_file.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,14 @@ services:
- "traefik.http.routers.archival-node.tls=true"
- "traefik.http.routers.archival-node.tls.certresolver=le"
- "traefik.http.routers.archival-node.entrypoints=websecure"
- "traefik.http.routers.archival-node.middlewares=redirect-https"
- "traefik.http.routers.archival-node.middlewares=redirect-https,rate-limt"
- "traefik.http.middlewares.redirect-https.redirectscheme.scheme=https"
- "traefik.http.middlewares.redirect-https.redirectscheme.permanent=true"
- "traefik.docker.network=traefik-proxy"
# Rate limiting configuration
- "traefik.http.middlewares.rate-limit.ratelimit.average=200"
- "traefik.http.middlewares.rate-limit.ratelimit.burst=300"
- "traefik.http.middlewares.rate-limit.ratelimit.period=1s"
networks:
- traefik-proxy
logging:
Expand Down
6 changes: 5 additions & 1 deletion templates/scripts/create_rpc_node_compose_file.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,14 @@ services:
- "traefik.http.routers.archival-node.tls=true"
- "traefik.http.routers.archival-node.tls.certresolver=le"
- "traefik.http.routers.archival-node.entrypoints=websecure"
- "traefik.http.routers.archival-node.middlewares=redirect-https"
- "traefik.http.routers.archival-node.middlewares=redirect-https,rate-limt"
- "traefik.http.middlewares.redirect-https.redirectscheme.scheme=https"
- "traefik.http.middlewares.redirect-https.redirectscheme.permanent=true"
- "traefik.docker.network=traefik-proxy"
# Rate limiting configuration
- "traefik.http.middlewares.rate-limit.ratelimit.average=200"
- "traefik.http.middlewares.rate-limit.ratelimit.burst=300"
- "traefik.http.middlewares.rate-limit.ratelimit.period=1s"
ports:
- "9615:9615"
networks:
Expand Down

0 comments on commit bc390f4

Please sign in to comment.