- 
                Notifications
    
You must be signed in to change notification settings  - Fork 2k
 
Description
Issue Description
We see 502 errors when an apollo-server pod is gracefully terminated in k8s. We host apollo-server in EKS and expose it using AWS ALBs.
AWS provides a troubleshooting guide for 502s and we can see our issue falls under the criteria for "The load balancer received a TCP RST from the target when attempting to establish a connection" (see screenshot below).
We attempted to increase the stopGracePeriodMillis in ApolloServerPluginDrainHttpServer to be higher than the kubernetes terminationGracePeriodSeconds and the ALB Target Group deregistration_delay but did not see a change in behavior.
We also have set httpServer.keepAliveTimeout and httpServer.headersTimeout higher than our ALB Session Timeout.
Link to Reproduction
https://repost.aws/knowledge-center/elb-alb-troubleshoot-502-errors
Reproduction Steps
- Terminate a pod running running apollo-server in EKS behind an AWS ALB
 
