S
S
stavinsky2013-08-29 18:12:52
linux
stavinsky, 2013-08-29 18:12:52

Experience in organizing HA solution for http/htts

Friends.
Please share your experience, who used what solutions for HA for sites.
The task is approximately the following:
2 physical web servers with private IPs,
2 virtual machines with private private IPs and one Virtual WAN IP.
Availability of a proxy on virtual IP
load balancing between 2 web servers
sticky connections (well, it is very desirable that if a user logs into 1 server, most likely by cookies (can it be somehow else?), Next time I would go there too.)

As far as I understood, there are only 2 open solutions:
- LVS (it hasn't been updated for a long time, maybe it doesn't need it?)))
- linux-ha (it seemed to me that it's like hammering nails with a microscope, in relation to my task)
- keepalived

There are also close ones, but “not quite right”:
- haproxy (It seems that virtual IP is not able)
- all kinds of implementations of CARP, VRRP

Do I understand the situation correctly? Are there any other solutions? What is better to choose?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
S
sevmax, 2013-08-30
@sevmax

haproxy + keepalived. We destroy very good traffic.
HAproxy for traffic balancing, keepalived for switching the virtual IP to the backup node when the main one goes down.
By the way, keepalived is the implementation of VRRP, and it grew out of LVS.

A
Anastasia_K, 2013-08-29
@Anastasia_K

the task is trivial indeed. carp/vrrp to the external address of the virtual machine, then on the nginx virtual machines, which distributes requests. If in nginx, 2 servers and the ip_hash option are specified in the upstream settings, then the same user will always get to the same backend.
When the virtual machine crashes, the external address will go to the second one, and everything will continue to work normally. when the physical server with the application crashes, nginx forwards requests to the survivor and everything continues to work again

R
ragus, 2013-08-30
@ragus

I would take LVS if you just need to scatter tcp.
about “has not been updated for a long time” - you are, to put it mildly, wrong: I advise you to look in [email protected] or just in git.
if it is necessary to look in http, then haproxy is better.

M
miragenn, 2013-09-02
@miragenn

There are 2 schemes in operation:
1st: 2 nodes, nginx on them, external SP is controlled via vrrpd
2nd: more nodes, also nginx, nginx SP and nginx are controlled via pacemaker

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question