Skip to content

Tune server-fn rate limits and handle 429 in the UI #122

Description

@peetzweg

Follow-up to #121, which added a per-IP rate limit on the server-function endpoints (burst 40, sustained 20/min — constants in src/start.ts).

Why: the numbers are an educated guess (~5 RPC calls per client-side navigation), not measured. And when a legit heavy user does trip the limit, the frontend has no handling for a 429 — TanStack Query will surface it as a generic error state, which reads as "the site is broken" instead of "slow down a moment".

What to do:

  • After some real traffic, check how close normal browsing gets to the limit and adjust burst/sustained accordingly
  • Handle 429 responses in the query/error layer: show a friendly "too many requests — retrying shortly" state and respect the Retry-After header instead of hammering retries

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions