moq-wg / moq-transport

draft-ietf-moq-transport
Other
87 stars 22 forks source link

Relays and extensions #20

Open xdfy opened 2 years ago

xdfy commented 2 years ago

It could help to add some text on relays support and extension. I'll try to provide some input there, from draft-defoy-moq-relay-network-handling. You may want to look at this draft for more context (this draft considers both stream-based and datagram-based MOQ, but it becomes simpler here because we are only using streams).

kixelated commented 2 years ago

Hey @xdfy, I read your draft and in particular agree with section 2.1. That's the motivation behind the HEADERS frame, although a better name would be RELAY since that's the intended usage. My general philosophy is that relays should default to being dumb (ex. a generic QUIC proxy) but have the potential to augment their behavior based on easy to parse content.

I completely agree that we need a way of supporting new behavior. There's a few different options, like versioning the protocol, negotiating extensions in the handshake, or just adding new fields to existing frames (ex. HTTP headers). This section of the draft is completely missing at the moment and I don't have any insight on the best approach.

xdfy commented 2 years ago

Thanks @kixelated.

For "default behavior" (or endpoint-driven behavior), the endpoint can enable or improve relay behavior by placing certain metadata in HEADERS, and it appropriate for a class of relays (including CDN caches). All the endpoints need to know is that, probably, there are some relays on the path that can use certain metadata to provide a common type of service, similarly to what is done with HTTP caching metadata. Protocol versioning seems appropriate to add new metadata in this case.

For non-default (or more specialized) behavior, using (simple) extension negotiation enables driving endpoints decision to set, or not, metadata to obtain a service. For example, XR support in wireless networks is rather specialized. Without extension information, to make use of this feature, a server would have to set the necessary metadata on all streams, since in general any stream can be carried over a wireless access network. Exchanging extension information can tell the server whether or not this metadata is needed.

A fully endpoint-driven behavior seems to align with the HTTP approach very well (which is the general philosophy you mentioned, I believe). We could always say, for example, that all XR clients/servers MOQ implementations will define their own default behavior, which is to send metadata that enables XR support through MOQ relays. On the other side, using extension negotiation clarifies interworking between network/relay and endpoints. For example, a client or server could detect early on that there is little chance that QoS will be acceptable, rather than try and get bad service. To conclude, I don't have a final argument here (between fully endpoint-driven or supporting both) and getting feedback from others in the community would be useful.

xdfy commented 2 years ago

Hi @kixelated, after thinking further about it, the distinction I proposed earlier is probably not needed. Even more specialized/niche relays like the one I mentioned for XR can use the HTTP-like model in your protocol design. I guess the idea is that the endpoint should, based on context (application type, server location, type of client device, etc.) determine the type of metadata that it should send to get the best service. It does not preclude the client or relay from giving a hint to the server, but that could be considered outside of the scope of the MOQ protocol (and, again, probably not needed in general).