Uploaded image for project: 'DC/OS'
  1. DC/OS
  2. DCOS_OSS-3844

Follow redirect responses for /v2/events request to non-leader Marathon instances


    • Type: Task
    • Status: Open
    • Priority: Medium
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: adminrouter
    • Labels:



      Currently, in Marathon 1.6.x (the version included in DC/OS 1.11), Marathon by default will proxy SSE event streams for the /v2/events endpoint. This is been the cause of several issues, and multiplies the probability that an event stream will be severed by two.

      In Marathon 1.7.x, we intend to send a redirect-to-leader 301 response with a Location header for request to the /v2/events on nonleading Marathon instances. This will be reversible via a flag (--deprecated_features=proxy_events), but the new default behavior will be to redirect.

      This will be especially a problem for external clients to DC/OS that are accessing the event stream over admin router; they will not be able to follow the redirect header as the target location will not be accessible from outside of the cluster. As a potential solution, we propose that admin router follows these redirect-to-leader responses from Marathon for the client.

      Acceptance Criteria

      Given a DC/OS cluster with multiple Marathon Masters
      When I cause the Marathon leader to abdicate leadership
      And then I make a request for /v2/events via admin router, while admin router still has not updated its reference for the current Marathon leader
      Then I should get a SSE connection to the current Marathon leader, and not see a redirect request


          Issue Links



              • Assignee:
                jasonkoelker Jason Koelker
                tharper Tim Harper
                Deepak Goel, Pawel Rozlach, Tim Harper
              • Watchers:
                3 Start watching this issue


                • Created: