Migrate credreg-prod to 16 GB nodes, raise main-app memory (#1056)#1057
Open
arielr-lt wants to merge 1 commit into
Open
Migrate credreg-prod to 16 GB nodes, raise main-app memory (#1056)#1057arielr-lt wants to merge 1 commit into
arielr-lt wants to merge 1 commit into
Conversation
main-app ran chronically at its 4Gi memory ceiling and OOM-killed mid-publish, returning 502s on large framework publishes. The 8 GB t3.large nodes could not host a larger memory limit, so move prod to 16 GB t3.xlarge nodes first, then raise the limit. - Replace ng_prod (t3.large) with ng_prod_v2 (t3.xlarge, parameterized instance type/scaling); migration done blue/green with zero downtime - Remove the retired ng_prod resource and its variables - Raise k8s-manifests-prod main-app limits.memory 4Gi -> 8Gi - Add PROD-NODE-16G-MIGRATION.md runbook Refs #1056
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
Fixes the recurring 502 Bad Gateway on large competency-framework publishes (#1056). Root cause:
main-appruns chronically at its 4Gi memory ceiling and gets OOM-killed mid-publish — when the Puma worker dies, nginx returns 502. Over the last ~30 days main-app peaked at ~4Gi almost every day and OOM-killed on more than half of them. The 8 GBt3.largeprod nodes can't host a larger memory limit (8Gi wouldn't even schedule on an 8 GB node), so prod is moved to 16 GBt3.xlargenodes first, then the limit is raised.Changes
ng_prod_v2—t3.xlarge(16 GB), parameterized instance type/scaling, identicalenv=productionlabel +NoScheduletaint and subnets as the old group.ng_prodresource and itsng_prod_*variables/tfvars.main-appmemory limit4Gi → 8Giink8s-manifests-prod/app-deployment.yaml(request unchanged at 3560Mi).PROD-NODE-16G-MIGRATION.mddocumenting the blue/green migration + rollback.Rollout (already executed live, zero-downtime)
Blue/green: created
ng_prod_v2, added a temp main-app PDB + scaled worker to 2, cordoned/drained the old nodes one-by-one (main-app held Ready throughout), migratedredis-0last (~28 s blip, EBS reattached in-AZ, no data loss), then destroyedng_prod. Prod now runs solely on 2× t3.xlarge. No user-facing outage.Notes
ng_prod_v2keeps the_v2name deliberately to avoid a resource-address rename (which would force node replacement).app-deployment.yamlimage:/replicas:fields remain CI-managed placeholders; onlylimits.memorychanged here.main-appPodDisruptionBudget (maxUnavailable=1) was added live during migration and left in place as hygiene (the app previously had none). Consider promoting it to a permanent manifest.Refs #1056