Subject: [sipcore] 503 response with Retry-After header field - request for clarification

From: Ivo Sedlacek <[email-masked]>
Date: Tue, 25 Nov 2014 14:27:18 +0000

Hello,

can anyone please help me with interpretation of the following RFC3261 requirement?

RFC3261 states:

----------------------------------------------------

21.5.4 503 Service Unavailable

   The server is temporarily unable to process the request due to a

   temporary overloading or maintenance of the server.  The server MAY

   indicate when the client should retry the request in a Retry-After

   header field.  If no Retry-After is given, the client MUST act as if

   it had received a 500 (Server Internal Error) response.

   A client (proxy or UAC) receiving a 503 (Service Unavailable) SHOULD

   attempt to forward the request to an alternate server.  >>It SHOULD NOT

   forward any other requests to that server for the duration specified

   in the Retry-After header field, if present.<<

   Servers MAY refuse the connection or drop the request instead of

   responding with 503 (Service Unavailable).

----------------------------------------------------

Use case:

- an entity E and an entity X record-route an INVITE-based dialog D

- entity E sends out-of-dialog SUBSCRIBE request to entity X. entity X rejects the SUBSCRIBE request with 503 response and with Retry-After header field.

QUESTION-1:  After reception of 503 response to the SUBSCRIBE request, is entity E allowed and expected to forward a BYE request sent as in-dialog request of the dialog D to entity X?

ASSUMED ANSWER-1: Yes, since BYE needs to pass via entity X. The only other possible alternative is reject the BYE and that's not a good idea as the dialog D would not be released.

QUESTION-2:  After reception of 503 response to the SUBSCRIBE request, is entity E allowed and expected to forward an in-dialog request (other than BYE) sent as in-dialog request of the dialog D to entity X?

ASSUMED ANSWER-2: In-dialog request (other than BYE) needs to pass via entity X. However, it is unclear whether entity E is allowed and expected to forward it to entity X as consequences are not so severe.

QUESTION-3:  After reception of 503 response to the SUBSCRIBE request, is entity E allowed and expected to forward another out-of-dialog SUBSCRIBE request to entity X?

ASSUMED ANSWER-3: No, given the marked statement above.

QUESTION-4:  After reception of 503 response to the SUBSCRIBE request, is entity E allowed and expected to forward another out-of-dialog request other than SUBSCRIBE request to entity X?

ASSUMED ANSWER-4: No, given the marked statement above.

Any views on the questions and assumed answers? Are other interpretation of SHOULD requirement above possible? Thanks for clarification.

Kind regards

Ivo Sedlacek

---

From: [email-masked] (Dale R. Worley)
Date: Tue, 25 Nov 2014 11:55:27 -0500

> From: Ivo Sedlacek <[email-masked]>

> - entity E sends out-of-dialog SUBSCRIBE request to entity X. entity
> - X rejects the SUBSCRIBE request with 503 response and with
> - Retry-After header field.
> 
> 
> 
> QUESTION-1:  After reception of 503 response to the SUBSCRIBE
> request, is entity E allowed and expected to forward a BYE request
> sent as in-dialog request of the dialog D to entity X?
> 
> ASSUMED ANSWER-1: Yes, since BYE needs to pass via entity X. The
> only other possible alternative is reject the BYE and that's not a
> good idea as the dialog D would not be released.

That looks correct to me.  But an alternative situation is where the
Record-Route URI resolves to more than one target address, only one of
which is "entity X".  In that case, the BYE can be forwarded as
required by sending it to a different target address.

Dale

---

From: Robert Sparks <[email-masked]>
Date: Tue, 25 Nov 2014 22:00:15 -0600

On 11/25/14 8:27 AM, Ivo Sedlacek wrote:
>    attempt to forward the request to an alternate server. _>>It SHOULD 
> NOT_
>
> _   forward any other requests to that server for the duration specified_
>
> _   in the Retry-After header field, if present.<<_
>
> - entity E sends out-of-dialog SUBSCRIBE request to entity X. entity X 
> rejects the SUBSCRIBE request with 503 response and with Retry-After 
> header field.
>
> QUESTION-1:  After reception of 503 response to the SUBSCRIBE request, 
> is entity E allowed and expected to forward a BYE request sent as 
> in-dialog request of the dialog D to entity X?
>
> ASSUMED ANSWER-1: Yes, since BYE needs to pass via entity X. The only 
> other possible alternative is reject the BYE and that's not a good 
> idea as the dialog D would not be released.
>
If something has sent you a 503 it's said not to talk to it until 
Retry-After passes. For _anything_. If you send anything, you are likely 
to make the condition that caused the 503 in the first place worse.

503 is not transaction or dialog specific. It is a statement about the 
server.

It's an very big hammer, and it should ONLY be sent when there's no 
alternative, exactly because of the edge cases you point out. You'll 
also find that in a multi-hop proxy environment, the load redistribution 
that should happen after a 503 is sent can easily lead to to 503s from 
the other elements (due to overload) if the environment isn't carefully 
engineered for this kind of sudden, large, traffic flow disruption.

If you send a BYE to the same thing that sent you a 503 for any other 
reason, before the Retry-After has expired, you are violating protocol.
I understand that it leaves the BYE in terrible shape, but we have that 
for _anything_ that rejects a BYE (even the far endpoint).
>
> QUESTION-2:  After reception of 503 response to the SUBSCRIBE request, 
> is entity E allowed and expected to forward an in-dialog request 
> (other than BYE) sent as in-dialog request of the dialog D to entity X?
>
> ASSUMED ANSWER-2: In-dialog request (other than BYE) needs to pass via 
> entity X. However, it is unclear whether entity E is allowed and 
> expected to forward it to entity X as consequences are not so severe.
>
Same thing. As Dale pointed out, it's best if you have a name in the 
record-route element you first described, so you have the opprotunity to 
move on to finding another concrete place to send the requests per 3263 
resolution.
>
> QUESTION-3:  After reception of 503 response to the SUBSCRIBE request, 
> is entity E allowed and expected to forward another out-of-dialog 
> SUBSCRIBE request to entity X?
>
> QUESTION-4:  After reception of 503 response to the SUBSCRIBE request, 
> is entity E allowed and expected to forward another out-of-dialog 
> request other than SUBSCRIBE request to entity X?
>
> Any views on the questions and assumed answers? Are other 
> interpretation of SHOULD requirement above possible? Thanks for 
> clarification.
>
> Kind regards
>
> Ivo Sedlacek
>
>
>
> _______________________________________________
> sipcore mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/sipcore