Forum Discussion

2 Replies

  • Hello,

     

    In fact, it's not easy to understand. if you do not use it regularly

     

    • Ration (session) LB is usually used for protocols that transmit multiple messages over the same connection. When you use the Ratio (session) method, the system selects the pool memeber according the ratio that you set:

    node 1 - ratio session 2

     

    node 2 - ratio session 4

     

    node 3 - ratio session 8 <- select this one

     

    But in this case you must take into account the following elements (session is considered to be a transaction), example for radius or other, if 2 transaction occur trough the same session we will count 2 hits and not 1 even if it's the same session.

     

    So, suppose that we have 3 transaction trough the same session you will have this lb:

     

    • node 3 (1 transaction - session 1) -> ratio 8
    • node 3 (2 transaction - session 1) -> ratio 8
    • node 2 (3 transaction - session 1) -> ratio 4

    ...

     

    Ration (member) is usually used when the server capacity of the pool members is different, and you want the system to weight connections to each pool member based on the value of the ratio weight you define:

     

    Server 1: 2 cpu - 8g ram

     

    Server 2: 1 cpu - 4g ram

     

    So you will set your ration like that:

     

    Server 1: ratio 8 (pool memeber 1.1.1.1:443)

     

    Server 2: ratio 4 (pool memeber 1.1.1.2:443)

     

    An in this case the lb is done based on the number of connection.

     

    Regards

     

  • we need to understand the difference between connection and session.

     

    "The terms session and connection are used to refer a communication between client and a server or two end points and they are used in same context. If you look at pure theory then:

     

    Connection:

     

    Client--------------->Server

     

    Client<------------->Server

     

    The bidirectional flow between client and server is a connection.

     

    Client Src IP(1.1.1.1) Client Port(12345) TCP ---------> Server Src IP(2.2.2.2) Server Port (80)

     

    Server Src IP(2.2.2.2) Server Port(80) TCP ---------->Client Src IP(1.1.1.1.) Client Port (12345)

     

    The above is a "Connection" when you consider both flows.

     

    When you consider a SINGLE flow:

     

    Client Src IP(1.1.1.1) Client Port(12345) TCP ---------> Server Src IP(2.2.2.2) Server Port (80)

     

    The above is "TCP SOCKET". It can be UDP as well.

     

    Session would be:

     

    The same birdirectional flow illustrated in first example but with different Client src ports so a client establishing many connections to the same server. So series of interactions between client and server will amount to a SESSION. A single bidirectional FLOW would be a CONNECTION and a SINGLE UNIDIRECTIONAL FLOW would be a SOCKET."

     

    Now please read the below

     

    "the system selects the pool member according to the ratio of the number of sessions each pool member has active; the system counts pending sessions as active sessions. In this context, a session is considered to be a transaction that occurs between the same client and server over an established connection."

     

    Thank You Murali.