-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[keyserver] run a temporary express health check server during migrat…
…ion for AWS load balancer health checks Summary: We had a problem when running our last keyserver migration on Ashoat's keyserver where the migration took much longer than prior migrations. The AWS load balancer's default grace period for the ecs task ran out and the migration process was cut off in the middle. This diff runs a temporary health check express server during the migration process so AWS can establish the ecs task as healthy Was originally worried that we would need to fully stop the health check express server, but given that it's only on the master process, I don't believe this is necessary. Additionally, the default `close` provided function prevents new connections Test Plan: Tested this locally by creating a dummy migration that slept for 10 seconds. During this time, keyserver endpoints were unavailable but the health check returned an OK response. Upon completing the migration, both the health route and keyserver endpoints were available. Also temporarily modified the health check route to timeout infinitely. Upon finishing the migration, the ongoing health check was terminated and the express server keyserver endpoints was able to be initialized. Will not land without testing on AWS, ensuring a healthy primary node goes online with a dummy migration running past the default AWS grace period Reviewers: varun, ashoat Reviewed By: ashoat Subscribers: tomek Differential Revision: https://phab.comm.dev/D13172
- Loading branch information
Showing
4 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// flow-typed signature: 4ffffaa246e31defe6bd7054e7869482 | ||
// flow-typed version: <<STUB>>/stoppable_v1.1.0/flow_v0.202.1 | ||
|
||
declare module 'stoppable' { | ||
declare module.exports: { | ||
<T: http$Server | ?https$Server>(server: T, grace?: number): T & { | ||
+stop: (callback?: (error: ?Error, gracefully: boolean) => void) => void, | ||
} | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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