Tag Info

New answers tagged

0

The easiest way is to use two separate IP addresses. Bind one haproxy frontend to each IP address, but use opposite backends as the fallback/backup. i.e. user comes to static.mydomain.com and as long as that cluster is up and running then great. If the app redirects them to dynamic.mydomain.com then great move to the other cluster... or if all the backend ...


0

I would recommend that you use a configuration management system like Puppet, Chef, Ansible, etc. to install your servers. Ansible is the easiest to set-up and does everything over SSH connections. You can use solutions like DRBD to keep the directories that need to be exactly the same in sync (customer / website data).


0

Have you considered having one external ELB handing off traffic to a number of nginx reverse proxies, and internal ELBs for the nginx proxies to route the apps servers. Unless you release a new app, the configs on the nginx servers will remain consistant, and you can scale up both the nginx group, and any/all of the apps server groups.


0

Um - Yes? SSL sessionid can be used as an optional performance enhancer - i.e. don't re-negotiate keys by hitting roughly the same server each time.... Sometimes we use it if source IP is all from one proxy... BUT it should never be used for session persistence if the application is depending on it always being correct. You need to use SSL termination + ...


0

I'm not sure that I would call DRBD easy, awesome maybe but not easy. As suggested by Jeroen: Round robin DNS or HAProxy can be used to route the traffic to both nodes, but yes your actual problem is that your database is only in one place. So hitting both servers may not be what you want. DRBD would ensure storage is replicated between the servers (solving ...


1

There are multiple solutions for this. The easiest setup is probably this: Synchronize website data between the servers with DRBD Run a MySQL master-slave set-up between the 2 servers. This will mean all database connections will go to one server. If that one fails, you have to switch to the slave (and promote it to master). You can automate this. ...


0

It looks like I found out the answer to this. I needed to add the line proxy_set_header Host $host; right under the proxy_pass lines on my load balancer config files.


-1

You can use Microsoft Network Load Balancing. It requires only two servers.


2

Google/Youtube (as well as many other companies, in particular CDNs) co-locate servers with many ISPs, and then DNS will return the IP address for those servers. That explains why some people may only see one IP, and others see a dozen. So the server that you see may not actually be in a Google data center, but rather just a few miles from your home/office, ...


14

There are several features which probably contribute to what you are seeing: anycast can allow one IP to be served by servers in multiple locations. geo balance gives out different IPs depending on what region you are in and what the load in the data centers is load balancers usually include some sort of hot IP failover to improve reliability Anycast and ...


9

There's a number of strategies in play with big sites like youtube: Not everyone gets the same IP address. Different DNS requests will get different A records coming back. Sometimes different IP addresses are returned based on geographic indicators (you get an IP that is "close to you"), and some variation is just for load-balancing purposes. Very few ...


1

You can use tcp-check. In a backend section, add something like that : option tcp-check tcp-check connect tcp-check send GET\ /\mainApp\/check HTTP/1.0\r\n tcp-check send Host:\ haproxy.1wt.eu\r\n tcp-check send \r\n tcp-check expect rstring (2..|3..) tcp-check connect tcp-check send GET\ /\microservice1\/check HTTP/1.0\r\n tcp-check send Host:\ ...


0

Well for starters, according to the HAProxy docs option redispatch only works for HTTP proxies: In HTTP mode, if a server designated by a cookie is down, clients may definitely stick to it because they cannot flush the cookie, so they will not be able to access the service anymore. Specifying "option redispatch" will allow the proxy to break ...


1

HAproxy doesn't have built-in functionality for complex health checks like this. That said, what you can do is write a quick and dirty page on the backends (or on the LB if it's easier/better), which performs GET requests on all the microservices and returns an given status code or string for a given result; 200, and 'OK' if they're all fine, 503 and ...


1

As your error message shows, the mysql command is trying to connect via a UNIX socket, not a TCP socket, and consequently ignores the port number. This is what mysql does if you give localhost as the host argument. Try using -h 127.0.0.1 instead.


0

The MySQL client isn't trying to connect via the IP of the system, but rather with the socket file, probably defined in your my.cnf. Since the service isn't running locally, it's not going to work. Try using using the IP when connecting: mysql -h10.181.102.249 -uuser -P 3307 -p -e "show variables like 'server_id'"; or mysql -h10.181.102.249 -uuser -p -e ...


1

This all comes down to performance. If your NFS storage is fast enough then there is nothing to stop you putting all your web app & web content files on it so they are accessible to all your front end VM's. That said, the most common reason for people not doing this is because the extra network latency involved in retrieving files from networked storage ...


0

You could install a load balancer such as Perlbal on one of the servers and pass off requests to the other based on URL or on a round robin basis as required but the bottle neck may very quickly become the server with Perlbal- typically you would use three servers in this situation. You say that you seek performance over redundancy; the more efficient way ...


0

While this question is quite old and the answer is correct, after some digging to resolve my own load balancing problem I found that there is a newer option to make the client ip based on the X-Forwarded-For or X-Real-IP and when combined with the ip_hash directive it properly balances load using the user's actual IP as the hash. ...


1

There is a workaround for this. Idea is to make a proxy server block for each upstream. upsteam api_servers { server 127.0.1.1; server 127.0.1.2; server 192.168.1.3; } server { listen 127.0.1.1; location / { proxy_pass http://192.168.1.1/api/; } } server { listen 127.0.1.2; location / { proxy_pass ...


0

You need something like... balance roundrobin cookie SESSIONID prefix indirect nocache server sso01 MainServer.net check cookie sso01 server sso02 BackupServer.net check cookie sso02 backup (Change SESSIONID to match the name of your session cookie) In your example your servers both have the same name.


1

If anybody comes here looking for a pure bash solution. Using jq to filter and parse the response of AWS CLI : aws elb describe-load-balancers | jq -r '.LoadBalancerDescriptions[] | select(.Instances[].InstanceId == "<YOUR-INSTANCE-ID>") | .LoadBalancerName ' Also in aws-codedeploy-samples they define this function in common_functions.sh. I ...


0

I belive you can achieve this feature by using second tomcat server as a hot standby. This is supported with mod_proxy in apache You can try following configuration & test it. <Proxy balancer://myCluster timeout=10 failontimeout=on> BalancerMember http://server1:8080 route=tomcat1 loadfactor=1 timeout=10 retry=30 BalancerMember ...


3

To understand following answer some background required: What is HTTP persistent connection. Basics of TCP protocol and particularly connection termination workflow. Am I performing the tests in a wrong way? Yes, you're performing test somewhat incorrectly. The problem is that your test is using PERSISTENT connection to send 10 requests. You can ...


0

Try using: env(variablename). However, this option seems to only exist in 1.5+. http://cbonte.github.io/haproxy-dconv/configuration-1.5.html#7.3.2-env


0

It's a limitation in syslog. You'll notice that the machine name is 31 characters long; that, plus a trailing \0, gives you a nice round power of two.


0

My impression is that you're looking for a Union Filesystem where you have two (or more) disks, each with their own file-system: /hdd1 /hdd2 | | +-- /dir1 +-- /dir1 | | | | | +- file2 | +- file4 | | +- file2 +-- file1 | | +-- file5 +-- /dir2 | ...


0

So you want to automatically distribute data between physically different file systems without providing redundancy for the data? Linux does not have a built-in method for this. You can use MD or ZFS to set up RAID, but automatic distribution and tracking of files between different file systems does not exist. This would be an application level (i.e. ...


0

I'm not sure why you'd want this over traditional RAID. But perhaps something like the copies= directive in the ZFS filesystem could be useful to you.


0

The error message is telling you that the upstream (that is, the web server you're proxying to) is closing the connection before any response headers were sent. Examine the logs for the backend web server to see what's actually going on.



Top 50 recent answers are included