Conversation
|
This PR enhances the graceful shutdown sequence of the Tyk Gateway by introducing a configurable waiting period. This allows orchestration platforms like Kubernetes to detect that the gateway is shutting down via its readiness probe, remove it from the load balancer's pool, and stop routing new traffic to it before the gateway process terminates. This helps prevent dropped requests during rolling updates and enables zero-downtime deployments. The key change is the introduction of a new configuration parameter, Files Changed AnalysisThe changes are concise and targeted across 5 files:
Architecture & Impact Assessment
sequenceDiagram |
Security Issues (1)
Security Issues (1)
✅ Performance Check PassedNo performance issues found – changes LGTM. Quality Issues (1)
Powered by Visor from Probelabs Last updated: 2026-06-09T18:08:11.935Z | Triggered by: pr_updated | Commit: bcfdfa9 💡 TIP: You can chat with Visor using |
…e-to-introduce-a-waiting-period-for-gateway-deregistration
…e-to-introduce-a-waiting-period-for-gateway-deregistration
🎯 Recommended Merge TargetsBased on JIRA ticket TT-16068: Enhance Graceful Shutdown Sequence to introduce a waiting period for Gateway Deregistration Fix Version: Tyk 5.14.0
Required:
📋 Workflow
|
…e-to-introduce-a-waiting-period-for-gateway-deregistration
…e-to-introduce-a-waiting-period-for-gateway-deregistration
…e-to-introduce-a-waiting-period-for-gateway-deregistration
| mainLog.Infof("Shutdown signal received: %v. Initiating graceful shutdown...", sig) | ||
|
|
||
| gw.shuttingDown.Store(true) | ||
| if gwConfig.GracefulShutdownDelaySeconds > 0 { |
There was a problem hiding this comment.
@MaciekMis you can move this into it's own function so it's easier to test. Wdyt?
There was a problem hiding this comment.
hey, we have already created a ticket to refactor this area and cover it with tests: https://tyktech.atlassian.net/browse/TT-17354
…e-to-introduce-a-waiting-period-for-gateway-deregistration
…e-to-introduce-a-waiting-period-for-gateway-deregistration
🚨 Jira Linter FailedCommit: The Jira linter failed to validate your PR. Please check the error details below: 🔍 Click to view error detailsNext Steps
This comment will be automatically deleted once the linter passes. |
|




Description
Related Issue
Motivation and Context
How This Has Been Tested
Screenshots (if appropriate)
Types of changes
Checklist
Ticket Details
TT-16068
Generated at: 2026-06-03 11:29:38