Repository navigation
perf: reuse probe connections, WAL journaling, vendor chunk split - #5
Merged
Merged
Conversation
Each HTTP probe built a fresh resty client, paying a full TCP+TLS handshake per check and leaving no pooled connection behind. Keep one long-lived client per (resolver, TLS verify mode) on the service; probes now dial over reused connections. Keying keeps per-host TLS NoVerify behavior intact, and the per-DNS dialer still bypasses per-check re-resolution.
Concurrent probe writes and API reads contended on the default rollback journal. Appending journal_mode(WAL) and synchronous(NORMAL) to the DSN lets history reads proceed during writes and cuts fsync cost per probe; the driver already supplies busy_timeout(5000).
react/react-dom/scheduler/axios now build into a vendor chunk cached across app deploys, so repeat page loads refetch only changed app code (26 kB index + 237 kB vendor vs one 288 kB blob). HostDetail and NotificationManager were already lazily imported, keeping g2plot out of the initial payload.
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.
Three targeted performance/stability changes, each in its own commit, all verified by build/vet/test plus local A/B evidence.
Changes
1. HTTP connection reuse across probes (internal/service/uptime)
2. SQLite WAL journaling (bootstrap)
journal_mode(WAL)+synchronous(NORMAL)to the DSN; the libtnb driver already defaultsbusy_timeout(5000).3. Vendor chunk split (frontend)
react/react-dom/scheduler/axiosbuild into a stablevendor-<hash>.jschunk.Local A/B evidence (same load shape, single variable = shared pool)
Verification
go test ./...incl. newTestService_HTTPClientReuseandTestSQLiteDSNPragmasgo vet ./...clean,go build ./...cleanvite buildartifact sizes recorded above