Forum Discussion

Chimdi's avatar
Chimdi
Icon for Nimbostratus rankNimbostratus
Sep 13, 2020

Load Balancing a pool member listening to different ports

Hi guys,

 

So I got a tricky scenario;

 

I have been able to create a pool with just a member to it listening on port 2375. But i want it to also listen on port 2376 and 2377 too without the need to create another member.

The applications being run here are docker and some Blockchain services and currently listening to those ports

My question here is this; Is it possible for me to create multiple ports on a single pool member?

 

I wanna achieve something of this sort as shown below:

 

Pool_Xo {

member 1 { 10.1.20.18:2375, 2376, 2377 }

member 2 { 10.1.20.18:2375, 2376, 2377 }

member 3 { 10.1.20.18:2375, 2376, 2377 }

}

 

and also, being able to perform load balancing.. is this possible? I feel it is

 

Looking forward to your reply

2 Replies

  • Hi,

     

    A pool member can only listen on a port or on any port.

    There are two solutions.

    Create this:

     

    Pool_any {

    member 1 { 10.1.20.18:0 }

    member 2 { 10.1.20.19:0 }

    member 3 { 10.1.20.20:0 }

    }

    Create 3 virtual servers, vs_1 with port 2375 and disable port translation (advanced configuration mode), vs_2 with port 2376 and port translation disabled, vs_3 with port 2377 and port translation disabled and attach the pool to all 3 virtual servers.

     

    Or create them all as poolmembers:

     

    Pool_Xo {

    member 1 { 10.1.20.18:2375 }

    member 2 { 10.1.20.19:2375 }

    member 3 { 10.1.20.20:2375 }

    member 4 { 10.1.20.18:2376 }

    member 5 { 10.1.20.19:2376 }

    member 6 { 10.1.20.20:2376 }

    member 7 { 10.1.20.18:2377 }

    member 8 { 10.1.20.19:2377 }

    member 9 { 10.1.20.20:2377 }

    }

     

    Cheers,

     

    Kees

     

     

  • You should be able to define the pool with three members, all using the same node IP address but different ports. (The monitor is not necessary. I added it during my testing.) For example:

    ltm pool mixed_port_pool {
        members {
            10.1.20.18:2375 {
                address 10.1.20.18
                session monitor-enabled
                state up
            }
            10.1.20.18:2376 {
                address 10.1.20.18
                session monitor-enabled
                state up
            }
            10.1.20.18:2377 {
                address 10.1.20.18
                session monitor-enabled
                state up
            }
        }
        monitor http 
    }

    You will almost certainly be limited on the load balancing method you can use with such a pool though. Round robin will certainly work and is what I tested with. But I'm suspicious of anything node-based or dynamic since there is only 1 node involved.