Uploaded image for project: 'Mule'
  1. Mule
  2. MULE-18396

Use the graceful shutdown timeout to allow persistent connections to do a last request

    XMLWordPrintable

Details

    • 0
    • Prod Eng - Elvis 06/05
    • S2
    • nothing
    • Hide

      Use the graceful shutdown timeout to allow persistent connections to do a last request.  The corresponding response will contain the "Connection: close" header.

      Show
      Use the graceful shutdown timeout to allow persistent connections to do a last request.  The corresponding response will contain the "Connection: close" header.

    Description

      Currently, when stopping applications, the requests sent to any http listener are being responded with a HTTP error. That error could be a 503 or a 404, depending on the instant when listener parses the request.

      There are some use cases, as rolling-update, where we need to avoid those errors during app shutdown, at least for persistent connections, but we should keep the current behavior for partial stops (simply stop a flow), to be backward compatible and honor RFCs.

      So, the proposal is:

      • On app stop, close the acceptor socket to avoid new connections.
      • Use the app's graceful shutdown timeout to wait for persistent connections to be closed, and after that time proceed with normal (return http errors)
      • Include the "Connection: close" header in all responses during the app shutdown, so the client has a way to identify that the server is being closed without receiving errors.

      Attachments

        Activity

          People

            ewerner@mulesoft.com Ezequiel Maximiliano Werner
            ewerner@mulesoft.com Ezequiel Maximiliano Werner
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: