New answers tagged

0

You could do something like: acl is_domain1 hdr(host) -i *.domain1.com redirect prefix http://domain2.com if is_domain1 That should take everything from domain1's request and redirect it to the right URI (including route and query options. I haven't tested it so you might need to read about redirect and tweak.


0

As of 2016 the LVS code is still maintained in the Linux kernel tree as a subset of the netfilter code. In the kernel tree check under: ...net/netfilter/ipvs and ...Documentation/networking/ipvs-sysctl.txt The ipvsadm tooling is stable, not obsolete and can still be downloaded from http://www.linuxvirtualserver.org/software/ipvs.html As far as I can ...


2

DSR is implemented in the Linux Kernel (IPVS) which only works with LVS (Linux Virtual Server). You will also need a health checking daemon like keepalived or ldirectord. BTW DSR does not work in Amazon AWS or in Azure due the to the network virtualisation security that they use. It won't work in things like Docker either. ...


0

In this particular case the problem was that the elastic load balancer was set to run in multiple subnets, and some of the subnets were not publicly accessible, and thus some requests were being routed to a bad IP. The confusion came because we misunderstood what the subnet setting on the ELB meant. So check your subnets!


0

As alternative you can look at Nginx Sticky Module When dealing with several backend servers, it's sometimes useful that one client (browser) is always served by the same backend server (for session persistence for example). Using a persistence by IP (with the ip_hash upstream module) is maybe not a good idea because there could be situations where a lot ...


1

if you need to monitor the status of real servers, you would be like to use keepalived. The keepalived could test the page that you set and would have a change of server alived for service after one down.


0

ip_hash is the loadbalance rule of nginx for session. However,the nginx server must get the real IP. if you use squid as the front server, then, the nginx server would get the IP of squid. Next, the nginx must direct the real server. If there are other loadbalancing servers after the nginx server, the session would not be send on the same real server.


0

Ensure your can visit real server through 80 port.please have a try. If ok, you should check your dns about the domainName. upstream webservers { server xx.azurewebsites.netIP; server xxx.azurewebsites.netIP; } server { listen 80; server_name localhost; location / { index index.html index.htm; proxy_pass ...


0

state MASTER can only be set one of the node. Alternatively, both set to state BACKUP, It will be automatically selected in MASTER by priority.


0

Disable HTTP connection re-use on your web servers. In TCP mode, haproxy doesn't know that the HTTP transaction has logically concluded.


0

You have misconfigured your VRRP instance. You have state MASTER on both nodes, but you can have only one master. Set backup server to state BACKUP and it will work. In general, rules are quite simple: Same on both servers: virtual_router_id - must be uniq for each group of servers virtual_ip Different on both servers: Instance name ( vrrp_instance ...


-2

sudo service keepalived stop then sudo service keepalived start Did it for me, even though I hadn't started it before.


0

Instead of using commands, I would recommend you editing: /etc/sysconfig/network /etc/sysconfig/network-scripts/ifcg-[eth0,enp0s3] /etc/resolv.conf Make sure that ONBOOT="yes" on /etc/sysconfig/network-scripts/ifcg-[eth0,enp0s3] and you are good to go.


1

Yes you can, editting /etc/hosts like this: 192.168.0.10 example.com.local That file is where it checks first when you are trying to resolve any hostname, then it goes ahead and uses DNS servers. I'm saying this so you are aware that, for example, if you add 1.2.3.4 google.com to /etc/hosts, you wont be able to get to the real google.com


2

I would suggest having both interfaces up all the time and tweak your routing table is such a way that: Your primary interface will always be preferred Your secondary has an IP and is ready (hot standby) but traffic is not going through (so you don't get changed too much) Have a second default gateway with higher metric You can do the above using ip ...


0

No this is not supported on the same box. The reason why is that when you install the Failover Clustering feature, it adds in the networking stack NetFT.sys the fault tolerant networking adapter for inter-node communication. Network Load Balancing is not aware of this, and traffic cannot be routed/load-balanced properly. You should probably think about ...


0

Panagiotis Moustafellos in the #devopsengineers slack channel actually helped me fix this issue. Turns out that the beatthemarket_service container does not exist. (Confusingly) It's the beatthemarkettask definition name. So I just replaced resource "aws_ecs_service" "beatthemarket_service" { name = "beatthemarket-service" cluster = ...


0

In most cases you need to choose CPU or RAM. Anyway, you need to investigate your app behavior and find out what particular metric better describes load for your servers and what could be a bottleneck in your particular case. If for example you have high "Network Out" while having low "CPU Utilization", your network coud become a bottleneck and you need to ...


0

Working config part: location / { proxy_pass http://sites; proxy_redirect http://192.168.1.135:8080 http://192.168.1.135; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } If problems with SELinux won't dissapear you need to turn httpd_can_network_connect ...


0

This problem is solved by forbidding persistent connections. In my case I added following line to config and everything is working fine now. server_persistent_connections off Huge thanks to @BillThor, who helped me in the comment section.


0

This might be a old question but it was hard to find the answer. There are two problems here 1. Tomcat web container is receiving requests on http so the redirects it would construct would be on the same. Spring helps upto some length but falls short. 2. Redirecting the user to HTTPS even if they are trying to access HTTP The second problem is easy one ...


2

you can load balance the servers using an AWS load balancer, off load ssl, run health checks and write a policy for the backend servers. but you can't route based on http headers, the ELB doesn't process application requests at that layer - so you will need another instance behind the load balancer to route or proxy. I think because the cloud infrastructure ...


2

You might need to escape the space before "example.com", i.e. option httpchk HEAD / HTTP/1.1\r\nHost:\ example.com Note the backslash before "example.com". Alternatively, you might try adding: http-send-name-header Host in that backend config. Hope this helps!


0

You should specify name option for each of cache_peer. Quote from the cache_peer documentation: name=xxx --- Unique name for the peer. Required if you have multiple peers on the same host but different ports. So your cache_peer configuration should look like this cache_peer 127.0.0.1 parent 9001 0 name=A round-robin no-query no-digest cache_peer ...


0

Take a look at taskset which lets you set which cores (CPUs) on which a process can run.


0

On the server-end you'd put something like a HAProxy in front of your app servers to load-balance across your servers. On the client-end you'd create a round-robin DNS entry that points to your HAProxies, preferably with an automated healthcheck that takes one out of DNS if it fails.


0

In new versions of haproxy (>1.6) you have to set the mode to http instead of tcp (default) to config : 'stats' statement ignored for frontend 'http-in' as it requires HTTP mode.


3

This should be a comment, but its a bit long. This system is not coping with the demand being placed on it. However you've not provided nearly enough information to diagnose what is going on let alone fix the problem. But the information needed is orders of magnitude greater than would be considered appropriate for a post here. But you did ask a specific ...


5

Nope, you really don't need to have 75+ uplinks. One connection is identified by 4 parameters: Source IP address Source port Destination address Destination port There is limit 65535 concurent connection, but not for all those parameters combined but for each of them. So you can have 65535 concurrent connections per source IP address, but you can have ...


1

Ideally these records that point to offline servers would not be published Ideally this is the worst case because it means changing published DNS servers, which is only possible with a short expiration which is bad. The normal use case is to have a SMALL number of PROPER load balancers behind ONE or a small number of IP addresses (which is something ...


2

I had to deal with a similar issue for one of my udnergraduate projects: load balancing DNS. https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Load_Balancer_Administration/s1-initial-setup-forwarding-VSA.html /etc/sysctl.conf net.ipv4.ip_nonlocal_bind = 1 Then attempt to bind the python application to the public IP of the ...


1

Your Classic VMs and ARM VM's can't share the same VNET, they need v1 and v2 VNETs respectively. You could join the two VNETs togther using a VNET to VNET connection, but this document states: A cloud service or a load balancing endpoint CANNOT span across virtual networks, even if they are connected together. This goes for the ARM load balancer as ...


0

The open source NGINX and the application delivery platform, NGINX Plus now supporting UDP load balancing. The new capability builds on our existing TCP and HTTP capabilities, making NGINX a powerful, easy-to-use, and consistent frontend for an even wider range of Internet applications and devices. Available in the release nginx-1.9.13


0

By using nginx's built-in server variables $request_uri and $server_name you can do this without using regular expressions at all. Add the following to your server's location block and you're done: if ($http_x_forwarded_proto = "http") { return 301 https://$server_name$request_uri; } This assumes your load balancer is sending the ...


1

What you are doing is not what IP_VS is intended to be used for. I think you are better off forgetting about IP_VS altogether and use a different approach. You mention VRRP in your diagram. That is a more sensible approach to your problem. However notice that VRRP by itself is for redundancy not load-balancing. Simply using VRRP without any other means of ...



Top 50 recent answers are included