Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix] faucet new rate limiter #20591

Merged
merged 5 commits into from
Dec 12, 2024

Conversation

stefan-mysten
Copy link
Contributor

@stefan-mysten stefan-mysten commented Dec 11, 2024

Description

Previous rate limiter is likely broken. This uses a better one with a per ip address strategy.

Test plan

How did you test the new or updated feature?


Release notes

Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required.

For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates.

  • Protocol:
  • Nodes (Validators and Full nodes):
  • Indexer:
  • JSON-RPC:
  • GraphQL:
  • CLI:
  • Rust SDK:
  • REST API:

@stefan-mysten stefan-mysten requested a review from a team December 11, 2024 05:37
Copy link

vercel bot commented Dec 11, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sui-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 12, 2024 0:04am
3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
multisig-toolkit ⬜️ Ignored (Inspect) Visit Preview Dec 12, 2024 0:04am
sui-kiosk ⬜️ Ignored (Inspect) Visit Preview Dec 12, 2024 0:04am
sui-typescript-docs ⬜️ Ignored (Inspect) Visit Preview Dec 12, 2024 0:04am

Copy link
Member

@amnn amnn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @stefan-mysten, note that we don't need to enforce per-IP rate limits at the faucet level, because there is a load balancer in front of it that already does that, but we do need to fix the previously broken middleware.

crates/sui-faucet/src/server.rs Outdated Show resolved Hide resolved
@stefan-mysten
Copy link
Contributor Author

Thanks @stefan-mysten, note that we don't need to enforce per-IP rate limits at the faucet level, because there is a load balancer in front of it that already does that, but we do need to fix the previously broken middleware.

Thanks. Set up a global rate limiter for all requests, similarly to what we had before. I think this should work.

Copy link
Member

@amnn amnn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@stefan-mysten stefan-mysten temporarily deployed to sui-typescript-aws-kms-test-env December 12, 2024 00:03 — with GitHub Actions Inactive
@stefan-mysten stefan-mysten merged commit 1488986 into MystenLabs:main Dec 12, 2024
48 checks passed
@stefan-mysten stefan-mysten deleted the faucet_rate_limiter branch December 12, 2024 00:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants