Skip to content

dstack-util: keep the gateway token stable for half an hour - #1499

Merged
kvinwang merged 1 commit into
nextfrom
feat/stable-gateway-agent-token
Oct 28, 2026
Merged

kvinwang merged 1 commit into
nextfrom
feat/stable-gateway-agent-token

Conversation

@kvinwang

Copy link
Copy Markdown
Collaborator

Follow-up to #1469. Every registration minted a new agent token, so the gateway's instance record changed every three minutes even when nothing else did.

Round iat down to the half hour and set exp an hour later. Ed25519 signatures are deterministic, so registrations within one period carry the same token, and it always has at least 30 minutes left (vs. 10 before).

This does not yet reduce gateway writes, which happen on every registration regardless; it makes the record stable so a later skip-if-unchanged in the gateway can.

Every registration minted a new token, so the instance record changed
every three minutes even when nothing else did. Round iat down to the
half hour and expire an hour later: Ed25519 signatures are deterministic,
so registrations within one period send the same token, and it always has
at least 30 minutes left.

This does not yet reduce gateway writes, which happen on every
registration regardless; it makes the record stable so a later
skip-if-unchanged in the gateway can.

Signed-off-by: Kevin Wang <wy721@qq.com>
@kvinwang
kvinwang enabled auto-merge October 28, 2026 09:59
@kvinwang
kvinwang merged commit b307d5f into next Oct 28, 2026
12 checks passed
@kvinwang
kvinwang deleted the feat/stable-gateway-agent-token branch October 28, 2026 10:04
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