-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TS 26.512 - Handling of 3XX HTTP redirects via interface at M2d #69
Comments
Good idea to alert the reader to the high-level problem of M2 redirects in clause 4.4 ("stage 2.5"). But note that it only applies to pull-based content ingest at reference point M2d. More specific guidance on HTTP redirect handling rightly belongs in clause 8.2 ("stage 3") which should probably be referenced from clause 4.4 anyway. The rewriting of HTTP redirects at M4d is a neat solution. This must be a problem for all CDNs, I imagine. Let's see how this discussion goes in 3GPP SA4 with @haudiobe and @tlohmar. If agreeable, I'd support describing it in general terms in clause 8.2. How about:
I assume the session-specific redirect mapping stays in place until some inactivity timer expires. I think it's fine to leave garbage collection of these session-specific redirect mappings to implementation. |
After a discussion we have come to the conclusion that there is a need to log the originating provisioning session id with media streaming access record. Therefore any dynamically learned redirection must be able to remember which provisioning session the request was for that originally caused the redirection. There should be a Provisioning Session Id added to Table 17.2-1 to hold this information as it is reported via R4. |
Having looked at table 17.2-1 for another reason today, I wondered whether the existing sessionIdentifier property might be sufficient to correlate requests to the dynamically learned redirect URL with requests to the original M4 URL, @davidjwbbc. |
The sessionIdentifier states that it is for the "HTTP session", I'd therefore assumed (since this structure reflects the normal access logs of a web server or CDN node) that this field was the client session identifier, i.e. an identifier for the TCP connection between the AS and the UE, used to group multiple requests for manifests and media objects together for a single media playback session. There's also nothing stopping the Media Stream Handler from using this single HTTP session to hop back and forth between different media (or even possibly play two streams at the same time). This means that the single sessionIdentifier may end up being used for multiple provisioning sessions. Therefore I still think an extra provisioning session id field is necessary. |
|
Fixes broadly endorsed at post-SA4#124 ad hoc meeting:
@ibouazizi indicated a preference for the 5GMS AS to follow the redirect itself, but @davidjwbbc cited the need for subsequent relative URLs to be resolved in the context of the redirected base path. @ibouazizi offered to provide some additional information about Apache Traffic Server: https://docs.trafficserver.apache.org/en/latest/admin-guide/configuration/redirecting-http-requests.en.html |
The information about Apache Traffic Server indicates that it passes through redirects although it will rewrite the Location header to be relative to the ATS if the redirect from the Origin has the same protocol and authority (host & port) as the Origin HTTP request. It provides a mechanism to add further mappings for other Origin servers that are statically known about and also provides a configuration flag which will convert the response into an error if the redirect is to an unmapped protocol and authority. However these configurations are not the default. It does not follow redirects itself. |
Just to cite a few of the relevant parts of the Apache Traffic Server documentation on redirect handling:
and:
The proposed change to clause 8.2 of TS 26.512 adds a paragraph describing the above concept of a "reverse-map rule" in terms of the functional effect is has at reference point M4. In the case of the 5GMS AS, the "reverse-map rule" is created dynamically in response to the redirects it encounters at reference point M2, so it could better be described as a dynamic reverse mapping rule. A good implementation of the 5GMS AS would also implement a garbage collection strategy to remove dynamic reverse mapping rules that haven't been used for a long time, but we don't need to specify that since it's an implementation choice. To help the reader, though, we could add another sentence to the NOTE below the new paragraph linking the specification text to the more familiar terminology commonly used by reverse HTTP proxies. |
Description
During implementation and testing of the 5GMSd Application Function and 5GMSd Application Server it was noticed that pull ingest points for M2d that use 3XX HTTP status code redirections, to balance load, caused the 5GMS Aware App running on the UE to divert traffic away from requesting media content via the 5GMSd AS. This behaviour will have an impact on the 5G network's ability to provide QoS services for 5GMS Aware Apps running on the UE as the traffic may no longer be flowing over controlled networks.
There is no guidance in TS 26.512 relating to the behaviour of the 5GMSd Application Server when redirects are received via the interface at M2d.
Suggested solution
Clause 4.4 should contain some wording relating to the use of 3XX HTTP status codes and behaviour when 3XX HTTP status codes are received via the ingest over interface M2d.
Simple warning
Clause 4.4 could simply state the problem with pull ingest servers using 3XX status codes and that passing these through the AS to the 5GMS aware application will redirect traffic away from the 5GMSd Application Server. It is then up to the MNO and AP to come to agreement on the use of 3XX HTTP redirects.
Ban 3XX status codes
Clause 4.4 could prohibit 3XX redirects on M2d. This solves the problem, but as stated in the description above this may not be practical due to the ingest using a CDN which is using redirection to load balance.
Handling of 3XX redirects
Clause 4.4 could give details for handling 3XX redirects arriving for pull ingest via M2d.
The following discusses some possible behaviours.
AS follows redirects itself
The AS could follow any redirects received via M2d to obtain the HTTP object requested via the pull ingest. The obtained object can then be provided in response to requests via M4d.
Although this would receive the original requested object, it would be difficult to take the redirection into account when follow-up requests are made for other objects with URLs relative to the received object. For example, following redirects to obtain a DASH manifest would get you the manifest (which would be passed to the UE via M4d) but follow-up requests from the UE for the relative media objects would then be made relative to the original ingest URL (where the media objects may not exist). To overcome this the AS would have to match the media segment URLs from the manifest and then generate ingest URLs which follow the original manifest redirects to find the new relative media object ingest location. This would require the AS to understand different media manifest formats so that it could perform the correct redirected ingest URL transformations for any media objects.
AS follows redirects and modifies the manifests
Similar to the above, except that the obtained manifest is modified so that when the UE requests relative media objects they are easily identified as belonging to a particular manifest and can the AS can apply alternative ingest URL rewriting rules to find the ingest location of the media objects based on the original redirection URLs for the manifest.
AS rewrites redirection URLS
In this strategy the AS dynamically learns redirection locations and sets up new download path prefixes (either as a sub-path of the provisioning session or as a new M4d path) for these learned redirections on the interface at M4d. The redirection URL
Location
header is then rewritten to point to this new path prefix on the AS and the redirection passed through to the UE via M4d. The UE will then follow the redirection to the object under the new path prefix and the AS can then request the object from the newly learned redirected ingest URL. This then has the benefit that the UE will subsequently make the relative media object requests using the same AS learned redirection prefix path, allowing the same redirection base URL for the ingest to be used via M2d.Example:
Additional context
Original 5GMSd AS github issue: 5G-MAG/rt-5gms-application-server#70
The text was updated successfully, but these errors were encountered: