Skip to content

Commit

Permalink
Clarified response processing at reverse-proxies
Browse files Browse the repository at this point in the history
  • Loading branch information
marco-tiloca-sics committed Mar 3, 2024
1 parent 231fdeb commit aafe788
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions draft-ietf-core-groupcomm-proxy.md
Original file line number Diff line number Diff line change
Expand Up @@ -529,9 +529,9 @@ The proxy processes the CoAP responses forwarded back to the client as defined i

* As a first possible case, the proxy stands in both for the whole group of servers and for the individual origin servers in the group. That is, the origin client cannot reach the individual servers directly, but only through the proxy.

In such a case, within a response forwarded back to the client, the value of the Response-Forwarding Option specifies addressing information that is directly associated with the proxy, and that the proxy leverages in order to forward received unicast requests to the origin server that originated the response.
In such a case, within a response forwarded back to the client, the value of the Response-Forwarding Option specifies addressing information TARGET that is directly associated with the proxy. When receving a unicast request sent to TARGET, the proxy forwards the request to the origin server that originated the response.

The client will be able to communicate individually with that server, by sending a follow-up unicast request to the proxy at the specified addressing information, according to which the proxy forwards the request to the server. An example is provided in {{sec-reverse-proxies-examples-ex1}} and {{sec-reverse-proxies-examples-ex2}}.
The client will be able to communicate individually with that server, by sending a follow-up unicast request to the proxy at the specified addressing information TARGET, according to which the proxy forwards the request to the server. An example is provided in {{sec-reverse-proxies-examples-ex1}} and {{sec-reverse-proxies-examples-ex2}}.

* As a second possible case, the proxy stands in only for the whole group of servers, but not for the individual servers in the group. That is, the origin client can reach the individual servers directly, without recourse to the proxy.

Expand Down Expand Up @@ -805,11 +805,23 @@ Any other proxy in the chain acts as a client and registers its own interest to

Upon receiving a response matching with the group request before the amount of time T' has elapsed, the proxy proceeds as follows.

If the proxy is the last one in the chain, i.e., it is the last hop before the origin servers, the proxy performs the steps defined in {{ssec-resp-proc-proxy}}, with no modifications.
If the proxy is the last one in the chain, i.e., it is the last hop before the origin servers, the proxy performs the steps defined in {{ssec-resp-proc-proxy}} if it is a forward-proxy or in {{sec-reverse-proxies-proxy-side}} if it is a reverse-proxy, with no modifications.

Otherwise, the proxy performs the steps defined in {{ssec-resp-proc-proxy}}, with the following differences.

* The proxy skips step 1. In particular, the proxy MUST NOT remove, alter or replace the Response-Forwarding Option.
* In any of the two following cases, the proxy skips step 1, hence the proxy MUST NOT remove, alter, or replace the Response-Forwarding Option.

* The chain is composed of forward-proxies.

* The chain is composed of reverse-proxies, and the last reverse-proxy (in fact, the whole chain) stands in only for the whole group of servers, but not for the individual servers in the group (see {{sec-reverse-proxies-proxy-side}}).

This ensures that, when receiving a response to a group request and consuming the Response-Forwarding Option, the origin client can retrieve addressing information that is directly associated with the origin server that originated the response.

* At step 1, the following applies in case the chain is composed of reverse-proxies, and the last reverse-proxy (in fact, the whole chain) stands in both for the whole group of servers and for the individual origin servers in the group (see {{sec-reverse-proxies-proxy-side}}).

In the Response-Forwarding Option, the proxy MUST replace the old value TARGET_OLD. The new value TARGET_NEW specifies addressing information directly associated with the proxy. The new value is such that, when receving a unicast request sent to TARGET_NEW, the proxy forwards the request to TARGET_OLD, i.e., to the (next hop towards the) origin server that originated the response.

This ensures that, when receiving a response to a group request and consuming the Response-Forwarding Option, the origin client can retrieve addressing information that is directly associated with the first reverse-proxy in the chain, i.e., with the next hop towards the origin server that originated the response.

* At step 2, "client" refers to the origin client for the first proxy in the chain; or to the previous hop proxy closer to the origin client, otherwise.

Expand Down

0 comments on commit aafe788

Please sign in to comment.