Skip to content

NethLink: connectivity check causes rate limiting (429) on startup with many clients #7849

@edospadoni

Description

@edospadoni

Problem

NethLink and phone-island use https://google.com to verify internet connectivity on startup. When many clients try to connect simultaneously, Google responds with HTTP 429 (Too Many Requests), causing:

  • NethLink to get stuck on the splash screen
  • Failed connectivity detection even when internet is available

Root Cause

  • Full GET request to google.com downloads unnecessary HTML (~100KB+)
  • Google's homepage is not designed for connectivity checks and applies rate limiting
  • No fallback endpoints if Google fails

Solution

Replace with lightweight dedicated connectivity check endpoints:

  1. Primary: https://connectivitycheck.gstatic.com/generate_204 - Google's official connectivity check (returns 204 No Content)
  2. Fallback 1: https://1.1.1.1/cdn-cgi/trace - Cloudflare
  3. Fallback 2: https://cloudflare.com/cdn-cgi/trace - Cloudflare alternative

Additional improvements:

  • Use HEAD requests instead of GET (zero data transfer)
  • Quick pre-check with net.isOnline() / navigator.onLine
  • Reduced timeout from 5s to 3s per endpoint
  • Sequential fallback on failure

Affected Projects

  • nethlink
  • phone-island

Metadata

Metadata

Labels

nethlinkThe issue is related to NethLink (NethVoice Desktop client)nethvoiceBug or features releted to the NethVoice projectnethvoice-ctiThe issue is related to NethLink (NethVoice Web client)testingPackages are available from testing repositories

Type

Projects

Status

Testing

Relationships

None yet

Development

No branches or pull requests

Issue actions