-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1040 - 2/3 Add ALB behind API's NLB to avoid errors on restart #2299
Conversation
e864110
to
a51fd10
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some change I had local and think its useful for debugging purposes
@@ -428,6 +429,7 @@ export class APIStack extends Stack { | |||
}, | |||
cookieStore, | |||
}); | |||
const apiLoadBalancerAddress = apiLoadBalancer.loadBalancerDnsName; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Differentiate between LB address (needed for API GW integration) and "direct" access address that points to the ALB (so lambdas don't need the additional network hop of going through the NLB to get to the API).
// This speeds up deployments so the tasks are swapped quicker. | ||
// See for details: https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-target-groups.html#deregistration-delay | ||
fargateService.targetGroup.setAttribute("deregistration_delay.timeout_seconds", "17"); | ||
|
||
// This also speeds up deployments so the health checks have a faster turnaround. | ||
// See for details: https://docs.aws.amazon.com/elasticloadbalancing/latest/network/target-group-health-checks.html | ||
fargateService.targetGroup.configureHealthCheck({ | ||
healthyThresholdCount: 2, | ||
interval: Duration.seconds(10), | ||
}); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved these to be close to the LB/TG definitions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few questions.
Plus whats the release plan? Do we need to break this up into multiple PRs to eliminate and then add infra or should it be good to send all in one PR?
Great question! I was so focused on fixing this quickly that I didn't think about this. I'm splitting this in three PRs:
|
9af3740
to
eb859b5
Compare
3b92645
to
3f316aa
Compare
Ref. metriport/metriport-internal#1040 Signed-off-by: Rafael Leite <[email protected]>
eb859b5
to
11c2797
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚢
Ref. metriport/metriport-internal#1040
Dependencies
Description
Point infra to use the ALB version of the API's - context
Testing
executeWithNetworkRetries
is not on base branch yet (develop
)Release Plan