Sticky Source IP

On many occasions, you want a load balancer to keep track of the sessions. To accomplish this, the MidoNet load balancer provides sticky source IP address persistence.

When configured on a virtual IP (VIP), the source IP address of the packet is used to determine the destination back-end server, and all the subsequent traffic from the same source IP address gets sent to the same server.

Session persistence example

The example below shows how to use the MidoNet CLI to configure a VIP with sticky source IP address persistence (persistence SOURCE_IP).

midonet> load-balancer lb0 pool pool0 create vip address 203.0.113.2 persistence SOURCE_IP protocol-port 8080
lb0:pool0:vip0
midonet> load-balancer lb0 pool pool0 vip vip0 show
vip vip0 load-balancer lb0 address 203.0.113.2 protocol-port 8080 persistence SOURCE_IP state up

To disable sticky source IP address persistence, set it to NONE:

midonet> load-balancer lb0 pool pool0 vip vip0 set persistence NONE
midonet> load-balancer lb0 pool pool0 vip vip0 show
vip vip0 load-balancer lb0 address 203.0.113.2 protocol-port 8080 state up
[Important]Important
  • If you toggle on/off sticky source IP address mode on a VIP, existing connections using that VIP will be dropped.
  • If you disable a pool member while in sticky source IP address mode, existing connections that are balanced to that member will be dropped.
  • If you disable a pool member while NOT in sticky source IP address mode, existing connections that are balanced to that member will be allowed to finish, but no new connections will be sent to that member.
  • Stickiness remains active for one day. If a session is inactive for more than a day, the stickiness goes away and the subsequent traffic will be load balanced normally.
Questions? Discuss on Mailing Lists or Chat.
Found an error? Report a bug.


loading table of contents...