Uploaded image for project: 'Mender'
  1. Mender
  2. MEN-1227

api-gateway: nginx will cache resolved DNS addresses

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: 1.0.0, 1.0.1, 1.1.0
    • Fix Version/s: None
    • Labels:

      Description

      nginx caches resolved DNS names. As an effect, when restarting a number of services in the backend, nginx may incorrectly direct proxy requests.

      The reason is that each service may get a different IP address when it starts. The best case is that docker assigns a new (previously unused) IP address to created service, in which case nginx will have no upstream to direct the requests to. The worst case is that service that had one address before restart, gets a new IP address that was used by another service. In this case, nginx will direct requests to incorrect service and accessing endpoints will return 404.

      Possible solutions:

      • try to figure out if proxy_pass with variable and a resolved fix the problem
      • provide a helper that sends SIGHUP to nginx if addresses change

        Attachments

          Activity

            People

            • Assignee:
              marcin.chalczynski Marcin Chalczynski
              Reporter:
              mborzecki Maciej Borzecki
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Zendesk Support

                  Summary Panel