Repository navigation
Adds the api-service stage job behind Varnish - #9
Merged
Merged
Conversation
…inned Varnish, with uncached 5xx and health responses, request limits above the service's and an allocation address health check
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
The stage job for the ported api-service, under the existing
api-service-stagejob and group names, so running it replaces the current service as a canary update and the old allocation keeps serving until the new one is promoted. It takes over from the parity job definition.Changes
operations/api-service-stage.hcl(fromapi-service-parity-stage.hcl): Consul serviceapi-service-stagewith the existing Traefik tags, Vault pathkv/stage-services/api-service-stage, default geo-ip cache TTL, no host volume and no Mongo lookup.varnish:9.1.0, listening on 8080 in the allocation. VCL:5xxresponses are never cached,/healthzis passed through, successful and4xxresponses keep the five minute TTL.varnishd -p http_req_size=128k -p workspace_client=256k, so requests up to the service's 80 KB limit reach it and larger ones get its431instead of a dropped connection./healthzthrough Varnish withaddress_mode = "alloc", keeping the existingcheck_restartsettings.healthy_deadline10m,progress_deadline15m.logging; the log follower falls back to the group service for tasks without their own, so both tasks' logs ship.Verified
nomad job validatepasses.varnish:9.1.0against a stub backend:/healthzis never cached;200and404are cached; a500is not cached and the request after recovery gets a fresh200; a cached200is still served while the backend fails.varnish:9.1.0with these parameters in front of Bun with--max-http-header-size=80000: up to 79 KB answered200, 81 KB to 127 KB answered431by the service; with Varnish defaults everything above 32 KB was a reset connection.