Switch Octavia API to use source balancing

Recent rolling upgrade testing showed an issue where the HAProxy
in front of the Octavia API was blind round-robin distributing
connections. This leads to failures during a rolling upgrade event
where consumers of the API doing version discovery may get different
API instance/versions across API calls.

This patch switches the Octavia API to use source IP balancing with
consistent hashing to improve the rolling upgrade scenario where
multiple API requests from the same user should be directed to the
same API instance.

It also switches the healthcheck to do a simple HEAD / check. This
should reduce load on both the Octavia API process and the HAProxy
process, but also lines us up for enabling /healthcheck later in
Victoria (A Ussuri Octavia feature).

Change-Id: If6b8964a1ac28221604e138723e5971d1f616edb
This commit is contained in:
Michael Johnson 2020-05-29 10:19:59 -07:00 committed by Bogdan Dobrelya (bogdando)
parent e62b614331
commit e868ea5d40
1 changed files with 5 additions and 0 deletions

View File

@ -1504,6 +1504,11 @@ class tripleo::haproxy (
service_network => $octavia_network,
mode => 'http',
member_options => union($haproxy_member_options, $internal_tls_member_options),
listen_options => merge($default_listen_options, {
'hash-type' => 'consistent',
'option' => [ 'httpchk HEAD /' ],
'balance' => 'source',
}),
}
}