Yes, you add a peer section:
peers haproxy-peers
peer haproxy1 127.0.0.1:1024
(haproxy1 must the the hostname of the local system)
and then you add a reference to that peer section in you stick table
definition for example:
stick-table type ip size 100k expire 20m peers haproxy-peers
On a reload the new process will then sync the stick table from the old
process.
If you want to do SSL offloading (and thus need nbproc>1) the best
workaround I found is to setup two haproxy instances (systemd makes that
pretty easy) one for the SSL offloading (nbproc>1) which then forwards
the traffic using abstract namespace socket to the other instance
(nbproc=1) that does the actual load-balancing.
That way you can reload the balancing instance keeping the stick tables
but also utilize multiple cpu cores for SSL offloading.
Regards,
Dennis
On 17.04.2015 18:07, CJ Ess wrote:
> Do you have an example of what that looks like? Am I literally adding
> 127.0.0.1 as a peer?
>
>
> On Fri, Apr 17, 2015 at 12:26 AM, Dennis Jacobfeuerborn <
> [email protected]> wrote:
>
>> On 17.04.2015 02:12, Igor Cicimov wrote:
>>> Hi all,
>>>
>>> Just a quick one, are the stick tables and counters persisted on haproxy
>>> 1.5.11 reload/restart?
>>
>> With nbproc=1 yes as long as you use a peers section that contains the
>> local host as an entry.
>>
>> Regards,
>> Dennis
>>
>>
>>
>>
>