Hygiene: TTL on connections, MAX_CONNECTIONS env var, cleanup#4
Open
Valamorde wants to merge 1 commit into
Open
Hygiene: TTL on connections, MAX_CONNECTIONS env var, cleanup#4Valamorde wants to merge 1 commit into
Valamorde wants to merge 1 commit into
Conversation
- Add DynamoDB TTL (2h) on connection items via timeToLiveAttribute in CDK and ttl field written in connect handler; additive change, non-destructive on deploy - Promote MAX_CONNECTIONS from hardcoded 30 to env var (default '30') in messageFunc environment and read via process.env.MAX_CONNECTIONS in forward.ts - Remove in-process 2h expiry check from forwardMessage; TTL handles cleanup - Delete all legacy per-function app.js and package.json files (superseded by NodejsFunction + esbuild from Phase 3) - Clean up stale !onconnect/app.js negation rules from .gitignore
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ttlattribute to connection items (2-hour expiry via DynamoDB TTL) — removes the need for in-process expiry checks during message forwardingMAX_CONNECTIONS = 30to an environment variable (MAX_CONNECTIONS) with the same default, configurable per stackabovevtttable in CDK (additive, non-destructive)package.jsonfiles (no longer needed with esbuild bundling)cdk.jsonapp entry tonpx ts-node infra.tsTest plan
pnpm test— all smoke tests passcdk diff— TTL attribute addition on table is non-destructive; no table replacement