Live Helper Chat support forum.. Forum is locked. New place for questions - Github Discussions

You are not logged in.

Announcement

#1 2015-04-29 14:44:38

it3
Member
Registered: 2015-04-29
Posts: 8

LHC with HAproxy

We have two load balanced servers using haproxy. LHC installed successfully but I can't log in to the admin interface.

If I edit my hosts file to point to one of the servers in the cluster (instead of the load balancer) I can log in fine. As soon as I bring the load balancer in it fails again.

The session cookie is created successfully in both cases.

Notes:
- The site is all SSL, with SSL terminated on the load balancer.
- Cookies are enabled in the browser

Any thoughts or config changes I can make?

Thanks

Ol.

Offline

#2 2015-04-29 15:04:04

it3
Member
Registered: 2015-04-29
Posts: 8

Re: LHC with HAproxy

I've just tested this some more and it appears to login randomly when working through the loadbalancer.

Sometimes 3 times, sometimes 10 times.

It's definitely session related...

Offline

#3 2015-04-29 15:21:04

remdex
Administrator
From: Lithuania
Registered: 2012-09-23
Posts: 3,661
Website

Re: LHC with HAproxy

The logical way would be to store php sessions in single place like Redis or Memcache they have failover and would allow random server processing php request and it would not matter what server is processing a request. Related information
https://www.digitalocean.com/community/ … untu-14-04

Idea would be the same with Redis

Offline

#4 2015-04-29 16:15:12

it3
Member
Registered: 2015-04-29
Posts: 8

Re: LHC with HAproxy

I have managed to get it working by using session stickiness in haproxy.

Thanks for the prod in the right direction. :-)

Ol.

Offline

#5 2015-04-29 16:21:11

remdex
Administrator
From: Lithuania
Registered: 2012-09-23
Posts: 3,661
Website

Re: LHC with HAproxy

Just curious, how many visitors you have that you already need HA proxy smile

Offline

#6 2015-04-29 18:14:20

it3
Member
Registered: 2015-04-29
Posts: 8

Re: LHC with HAproxy

According to GA, this month
100000 sessions
320000 page views
50000 unique visitors

According to haproxy
320GB bandwidth usage

Primary reason for haproxy though is for high availability rather than load balancing, but load balancing is always helpful :-)

Offline

#7 2015-04-29 20:13:28

remdex
Administrator
From: Lithuania
Registered: 2012-09-23
Posts: 3,661
Website

Re: LHC with HAproxy

And how many chat instances on single server? or it's just one lhc installation? And chat's daily if not secret:)
Just then someone asks what's the biggest installation you have I have no idea big_smile

Offline

Board footer