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

Implement rate-limit for outgoing requests #1382

Closed
adeelx opened this issue Feb 20, 2024 · 4 comments
Closed

Implement rate-limit for outgoing requests #1382

adeelx opened this issue Feb 20, 2024 · 4 comments
Labels
🔨 enhancement New feature or request Stale

Comments

@adeelx
Copy link

adeelx commented Feb 20, 2024

Problem

I'm using 1.1.1.1 as my upstream as follows:

upstreams:
  strategy: parallel_best
  init:
    strategy: fast
  groups:
    default:
    - tcp-tls:1.1.1.1:853 # cloudflare
    - tcp-tls:1.0.0.1:853 # cloudflare

Whenever I restart the blocky container I run afoul of CloudFlare's 10QPS limit because all the devices on the network are simultaneously requesting IPs. To counter this, I have had to put blocky behind dnsmasq and on every restart I have to first switch dnsmasq to use Google DNS, then start blocky and finally once blocky shows that it can handle queries I switch dnsmasq to use blocky.

Do note that this happens only when the blocky DNS server has been down for ~30mins or so and the network doesn't have any DNS resolvers which causes devices to retry queries and hence builds up the query volume.

Relevant Links

The Ask

It will be helpful if blocky can be configured to not exceed a given QPS limit on a global level. Something along the lines of follows:

upstreams:
  qps_limit: 10 # or another sane default
  strategy: parallel_best
  init:
    strategy: fast
  groups:
    default:
    - tcp-tls:1.1.1.1:853 # cloudflare
    - tcp-tls:1.0.0.1:853 # cloudflare

This would make cold-starts of blocky much easier.

@ThinkChaos
Copy link
Collaborator

Does configuring the bootstrap DNS server to something else workaround the issue?

@adeelx
Copy link
Author

adeelx commented Feb 20, 2024

Yes, configuring it to Google DNS alleviates the problem.

@ThinkChaos ThinkChaos added the 🔨 enhancement New feature or request label Feb 20, 2024
Copy link
Contributor

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label May 21, 2024
Copy link
Contributor

This issue was closed because it has been stalled for 5 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔨 enhancement New feature or request Stale
Projects
None yet
Development

No branches or pull requests

2 participants