buzz icon indicating copy to clipboard operation
buzz copied to clipboard

Mobile startup issues a burst of ~106 relay /query requests, 27 of them empty

Open meeveem opened this issue 2 months ago • 0 comments

Self-hosted relay, Buzz Desktop 0.5.23, mobile client. Source pinned at c507a4d488ca27796e78d876b9c24ee38442cc1b.

Symptom

Opening the mobile app issues a burst of relay /query HTTP requests. Over a 3-minute window, one client IP produced 106 /query, of which 27 had Content-Length: 2 (an empty filter):

106 x /query   (7-25 ms each, 200)
  6 x /events  (13-16 ms each, 200)
Content-Length distribution:
  27 x 2        <- empty
  18 x 5830
  14 x 427
  10 x 295
  10 x 2461
   8 x 155

The relay is not the bottleneck: every request returns in 7-25 ms and the relay sits at 0.5% CPU. The cost is the number of round-trips on a mobile connection.

Expected

A single batched sync on open, then incremental updates over the existing WebSocket subscription.

Where to look

  • mobile/lib/shared/relay/relay_session.dart — queryRelay() (the /query bridge)
  • Callers: mobile/lib/shared/community/community_membership_provider.dart, mobile/lib/features/channels/channel_management_provider.dart, mobile/lib/features/invites/invite_create_provider.dart

Reproduction

Point the relay's Caddy at log { output stdout format json level INFO }, open the mobile app, and count uri":"/query" in the access log.

meeveem avatar Sep 18 '26 11:09 meeveem