Uploaded image for project: 'National Data Service'
  1. National Data Service
  2. NDS-727

Address potential performance pitfalls in Express web server

XMLWordPrintableJSON

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • None
    • None
    • User Interface
    • None
    • NDS Sprint 20

      I stumbled across this page that details best practices of using Express in production:
      https://expressjs.com/en/advanced/best-practice-performance.html

      There are things on this list that we don't do properly, for example:

      • We do not use gzip compression
      • We use synchronous functions, like console.log (instead of an asynchronous logging library) See NDS-744
      • We need to set NODE_ENV="production" (this is hopefully just an additional ENV call in the Dockerfile)
      • We currently serves all static files directly from Express (instead of delegating to a reverse proxy or the ingress loadbalancer) we only serve a single endpoint, the rest are static files

      This ticket is complete when we have addressed the above concerns, and either mitigated their effects or determined that their effects will be minimal.

              lambert8 Sara Lambert
              lambert8 Sara Lambert
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Estimated:
                  Original Estimate - 1 day
                  1d
                  Remaining:
                  Remaining Estimate - 1 day
                  1d
                  Logged:
                  Time Spent - Not Specified
                  Not Specified