Skip to content

chore(serverinfo): drop POLL_INTERVAL 30s -> 4s - #3

Merged
s950tx16wasr10 merged 1 commit into
mainfrom
chore/serverinfo-poll-4s
May 18, 2026
Merged

chore(serverinfo): drop POLL_INTERVAL 30s -> 4s#3
s950tx16wasr10 merged 1 commit into
mainfrom
chore/serverinfo-poll-4s

Conversation

@s950tx16wasr10

Copy link
Copy Markdown
Contributor

What

`docker-compose.yml` `serverinfo-updater.POLL_INTERVAL` 30 -> 4.

Why

Matches the landing-page `data-poll-interval=4000` so every browser
fetch hits fresh upstream data instead of the same cached JSON for 7
out of 8 polls.

Cost analysis

  • `/world/Topic ?status` is a sync proc, sub-millisecond per call →
    ~0.025% of one DD-main-thread core at 4s cadence.
  • One additional ~700-byte atomic file write every 4s. Hits page
    cache, not disk per write.
  • The public-log-parser still polls the same file at its 60s cadence;
    ongoing-round protection semantics unchanged.

Companion

`ReduxStation/website#8` — 1Hz client-side ticker on `round_duration`
so the displayed clock doesn't step 4s at a time even with this
shorter interval.

Deploy

cd /srv/redux/infrastructure
git pull
docker compose up -d --force-recreate serverinfo-updater

Matches the landing-page poll cadence (data-poll-interval=4000ms in
_data/site.yaml). At 30s, every 7th browser fetch hit fresh upstream
data and the other 6 returned a stale cached JSON, so player counts
and round durations stepped 30s at a time on the page.

DD-side cost is negligible:
  - /world/Topic ?status is a sync proc, sub-millisecond per call
  - 7.5x more calls = ~0.025% of one core on DD main thread
  - One additional 700-byte atomic file write every 4s

The public-log-parser also polls this same file (every 60s per its
config) for ongoing-round protection; its semantics are unchanged.

Companion change: ReduxStation/website#8 adds a 1Hz client-side
ticker so the displayed round_duration increments smoothly between
the 4s server polls.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

1 participant