0

First sorry for the noob question, but I am kind of lost here.

Here is what I have: An N number of workstations that are communicating with private servers. Server 1 is production and server 2 is backup. Usually none of them will need internet access to work.

In case Server 1 fail. User will turn on backup server and workstations must automatically start using it (they are running standard web browser).

At any moment I should be able to SSH from internet to both server 1 and/or 2 for maintenance.

Each server have up to 3 spare ports if I need more than 1 connection/network.

For this what should I use for the "something" device? Or is this whole architecture wrong for may needs?

serverfault

Gustavo Vargas
  • 123
  • 1
  • 5
  • "something" is probably a load balancer. You would point your workstations to a single IP per application then it would be responsibility of this device to monitor Server 1 & 2 and direct traffic to the appropriate server. You might also be able to setup some VIPs (shared IPs) on the servers and forego the idea of a "something" device. But that's dependent on the OS and application, and IMHO much more complicated than running a load balancer. – Brandon Xavier Jun 06 '22 at 19:31

1 Answers1

0

"Something" need to be a load balancer - HAProxy would do the job. You simply add both "Server 1" and "Server 2" and check if first is not working and move your traffic to back up. Here is a example HAProxy config:

frontend web

bind :80
  option httplog
  option forwardfor except 127.0.0.1
  option forwardfor header X-Real-IP
  acl is-correct-address hdr_dom(host) -i something.server.dns.address
  acl is-production-offline nbsrv(production) lt 1
  use_backend backup if is-correct-address is-production-offline
  use_backend production if is-correct-address
backend production
  mode http
  server server-1 10.0.0.1:80
backend backup
  mode http
  server server-2 10.0.0.2:80
Va_ni_tas
  • 26
  • 2