Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

feat: Graceful Shutdowns #280

Merged
merged 8 commits into from
Jul 27, 2020
Merged

feat: Graceful Shutdowns #280

merged 8 commits into from
Jul 27, 2020

Conversation

opaolini
Copy link
Contributor

@opaolini opaolini commented Jul 13, 2020

Description

This PR adds a createDefaultServer function to be used across all HTTP runners which prepares a http.Server with:

  • Header timeouts server.keepAliveTimeout & server.headersTimeout
  • Healthcheck service exposed at /healthz
  • Graceful shutdown through server.close
  • Adds common middleware: requestLogger, cors, bodyParser

Testing Instructions

This PR has been tested on staging, however we can still unit test the graceful shutdown:

  • Add unit test for graceful shutdowns

Checklist

  • Update documentation as needed. Website Documentation PR:
  • Prefix PR title with [WIP] if necessary.
  • Add tests to cover changes as needed.

@opaolini
Copy link
Contributor Author

deploy staging

@opaolini
Copy link
Contributor Author

deploy staging

@opaolini opaolini changed the title [WIP] feature: Graceful Shutdowns feat: Graceful Shutdowns Jul 13, 2020
src/runners/utils.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@xianny xianny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is nice! Thank you for doing this 😃

Assume there will be a 0x-main-infra PR to update the env vars; can you add it to the OP here for posterity?

src/config.ts Outdated Show resolved Hide resolved
@opaolini
Copy link
Contributor Author

deploy staging

@opaolini opaolini merged commit 5736c74 into master Jul 27, 2020
@opaolini opaolini deleted the feat/graceful-shutdowns branch July 27, 2020 05:44
github-actions bot pushed a commit that referenced this pull request Jul 27, 2020
# [1.12.0](v1.11.0...v1.12.0) (2020-07-27)

### Bug Fixes

* synchronization false unless tests ([#292](#292)) ([e050a22](e050a22))

### Features

* Curve BTC Bridge ([#294](#294)) ([82f9276](82f9276))
* Depth Chart API endpoint ([#290](#290)) ([540f92e](540f92e))
* Graceful Shutdowns ([#280](#280)) ([5736c74](5736c74))
* Update protocol fee to 70k. Yield to event loop in path optimizer ([#285](#285)) ([a996c7b](a996c7b))
@github-actions
Copy link

🎉 This PR is included in version 1.12.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants