Wednesday, 17 September 2014

Diameter Connections vs. Sessions

   This section attempts to provide the reader with an understanding of  the difference between "connection" and "session", which are terms
   used extensively throughout this document.

   A connection refers to a transport-level connection between two peers  that is used to send and receive Diameter messages.  A session is a
   logical concept at the application layer that exists between the  Diameter client and the Diameter server; it is identified via the
   Session-Id AVP.

         +--------+          +-------+          +--------+
         | Client |          | Relay |          | Server |
         +--------+          +-------+          +--------+
                  <---------->       <---------->
               peer connection A   peer connection B 
                  <----------------------------->
                          User session x

                Figure 1: Diameter Connections and Sessions

   In the example provided in Figure 1, peer connection A is established  between the client and the relay.  Peer connection B is established
   between the relay and the server.  User session X spans from the client via the relay to the server.  Each "user" of a service causes
   an auth request to be sent, with a unique session identifier.  Once  accepted by the server, both the client and the server are aware of
   the session.

   It is important to note that there is no relationship between a connection and a session, and that Diameter messages for multiple
   sessions are all multiplexed through a single connection.  Also, note that Diameter messages pertaining to the session, both application-
   specific and those that are defined in this document such as ASR/ASA, RAR/RAA, and STR/STA, MUST carry the Application Id of the
   application.  Diameter messages pertaining to peer connection establishment and maintenance such as CER/CEA, DWR/DWA, and DPR/DPA
   MUST carry an Application Id of zero (0).

No comments:

Post a Comment