Skip to content

Commit

Permalink
Bug:#1380771 Adding the load balancer session persistence parameters …
Browse files Browse the repository at this point in the history
…fro Service Instance's Virtual ip. The session persistense type and name are written to haproxy configuration file in the backend section

Change-Id: I44a2b5c750f2ab62221d5bd43925df3de2dc85cd
  • Loading branch information
divakardhar committed Oct 14, 2014
1 parent 1625024 commit 890b3d0
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/vnsw/agent/oper/loadbalancer_haproxy.cc
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,21 @@ void LoadbalancerHaproxy::GenerateBackend(
<< hm.expected_codes << endl;
}
}
const autogen::VirtualIpType &vip = props.vip_properties();
if (vip.persistence_type == "HTTP_COOKIE") {
*out << string(4, ' ') << "cookie SRV insert indirect nocache"
<< endl;
}
if (vip.persistence_type == "SOURCE_IP") {
*out << string(4, ' ') << "stick-table type ip size 10k"
<< endl;
*out << string(4, ' ') << "stick on src" << endl;
}
if (vip.persistence_type == "APP_COOKIE" &&
!vip.persistence_cookie_name.empty()) {
*out << string(4, ' ') << "appsession " <<
vip.persistence_cookie_name << " len 56 timeout 3h" << endl;
}

for (LoadbalancerProperties::MemberMap::const_iterator iter =
props.members().begin();
Expand Down

0 comments on commit 890b3d0

Please sign in to comment.