# LB::Server pool empty

**URL:** <https://community.f5.com/t/lb-server-pool-empty/47846>\
**Category:** Technical Forums\
**Tags:** ltm, application-delivery\
**Created:** [March 13, 2017, 9:28am UTC](https://community.f5.com/t/lb-server-pool-empty/47846 "2017-03-13T09:28:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Perrot\_Ludovic](https://avatars.discourse-cdn.com/v4/letter/p/a8b319/32.png) [@Perrot\_Ludovic](https://community.f5.com/u/Perrot_Ludovic)\
**Post date:** [March 13, 2017, 9:28am UTC](https://community.f5.com/t/lb-server-pool-empty/47846/1 "2017-03-13T09:28:44Z")

</div>

I need to switch between two different pools, based on availables members. I found several answers and test this one:

```tcl
when RULE_INIT {
    set static::BACKUP_POOL "/Partition/Backup_Pool"
}
when HTTP_REQUEST {
    set default_pool [LB::server pool]

    if { [active_members $default_pool] < 1 } {
            pool $static::BACKUP_POOL
    else {
            pool $default_pool
        }    
    }
}

```

However, LB::server pool always returns an empty string.

I am on version 11.4.1

---

<div class="post-metadata">

**Author:** ![Leonardo\_Souza](https://avatars.discourse-cdn.com/v4/letter/l/96bed5/32.png) [@Leonardo\_Souza](https://community.f5.com/u/Leonardo_Souza)\
**Post date:** [March 13, 2017, 1:12pm UTC](https://community.f5.com/t/lb-server-pool-empty/47846/2 "2017-03-13T13:12:00Z")

</div>

Do you have a default pool in the virtual server?

Also, you don’t need to use the LB::server pool, if you use a default pool in the virtual server. A simplified iRule would be:

```tcl
when RULE_INIT {
    set static::BACKUP_POOL "/Partition/Backup_Pool"
}
when HTTP_REQUEST {
    if { [active_members $default_pool] < 1 } {
            pool $static::BACKUP_POOL
    }
}

```
