perf(backend): JWKS warm-up, compressie, parallelle sync-poll (vervolg op #350)#351
Open
robbertbos wants to merge 2 commits into
Open
perf(backend): JWKS warm-up, compressie, parallelle sync-poll (vervolg op #350)#351robbertbos wants to merge 2 commits into
robbertbos wants to merge 2 commits into
Conversation
This was referenced Jun 8, 2026
84ed8d0 to
493904b
Compare
250828d to
56cbc21
Compare
37c7b54 to
88ba803
Compare
Vervolg-quick-wins op PR1 (#350), drie onafhankelijke verbeteringen: - JWKS: expliciete timeoutDuration 2500ms (i.p.v. de jose-default 5000ms) plus een best-effort warmUpJwks() bij worker-start, zodat de eerste geauthenticeerde request niet de koude Keycloak-fetch betaalt. Tokenvalidatie ongewijzigd. - @fastify/compress (global) voor grote JSON-responses. - sync-poll: de twee onafhankelijke queries parallel via Promise.all. De atomische save (db.transaction) is hier komen te vervallen: die wordt gedekt door de save-race-fix #353 (transactie + conditional UPDATE), inmiddels gemerged. 100% coverage.
De frontend-nginx comprimeerde niets; de SPA-bundle (JS/CSS/HTML) ging ongecomprimeerd over de lijn. gzip on + types/min_length/vary toegevoegd zodat de tekst-assets gecomprimeerd worden (snellere initial load). Afbeeldingen/fonts worden overgeslagen (al gecomprimeerd). Aanvulling op de backend-compressie (@fastify/compress) in deze PR. Gevalideerd met nginx -t.
56cbc21 to
0df2bbb
Compare
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.
Vervolg-quick-wins op #350 (gestapeld: base
perf/backend-concurrency-scaling).Wijzigingen
auth.ts,index.ts): explicietetimeoutDuration: 2500(i.p.v. de jose-default 5000ms) + best-effortwarmUpJwks()bij worker-start. Tokenvalidatie ongewijzigd. (Hygiëne voor de koude-start na een deploy — niet de fix voor een "elke-klik-traag"-symptoom.)app.ts):@fastify/compress(global) voor grote JSON-payloads.containers/frontend/nginx.conf):gzip onvoor de SPA-bundle (JS/CSS/HTML) — die ging ongecomprimeerd over de lijn. Gevalideerd metnginx -t. De ingress (ingress-nginx, defaults) geeft de backend-compressie door; voor de API is daar niets nodig.sync.ts): de twee onafhankelijke queries viaPromise.all.Bijgewerkt na merge van #353
db.transaction) is hieruit verwijderd — gedekt door fix(backend): dicht simultane save-race via atomic conditional UPDATE (Forgejo #50) #353 (transactie + conditional UPDATE), gemerged. Raaktassessments.tsdus niet meer → geen conflict.Verificatie
100% coverage,
tscschoon,nginx -tok. Conflictvrij met samenwerken.