HAproxy

What is pass-through load balancer? How is it different from proxy load balancer?

北城余情 提交于 2019-12-03 11:33:43
问题 Google Cloud Network load balancer is a pass-through load balancer and not a proxy load balancer. ( https://cloud.google.com/compute/docs/load-balancing/network/ ). I can not find any resources in general on a pass through LB. Both HAProxy and Nginx seems to be proxy LBs. I'm guessing that pass through LB would be redirecting the clients directly to the servers. In what scenarios it would be beneficial? Are there any other type of load balancers except pass-through and proxy? 回答1: It's hard

haproxy - unable to load SSL private key from PEM file

♀尐吖头ヾ 提交于 2019-12-03 10:26:11
haproxy does not start anymore, it shows the error bind <ip>:443' : unable to load SSL private key from PEM file ... We did not change anything on the certificates or configuration. Since the last start we only made normal updates to the system. To find the error, I generated a completely new certificate (self signed) but the error still exists. This is the structure of the PEM file: -----BEGIN CERTIFICATE----- MIIDXjCCAkY... -----END CERTIFICATE----- -----BEGIN RSA PRIVATE KEY----- MIIEpgIBAAKC.... -----END RSA PRIVATE KEY----- I also tried to convert the private key with openssl pkcs8 -topk8

HAProxy vs. Nginx

佐手、 提交于 2019-12-03 10:01:56
I was looking at using HAProxy and Nginx for load balancing, and I had some questions: Should I use JUST HAProxy over Nginx for the proxy server? Is there any reason to have HAProxy and Nginx installed on the same proxy server? Thanks haproxy is a "load balancer" it doesn't know to serve files or dynamic content. nginx is a web server capable of many interesting things. if you only need to load balance + HA some third web server then haproxy is enough. if you need to implement some static content or some logic in routing of the requests before terminating them on a third server then you may

Load Balancing using HAProxy for Postgresql 9.4

匿名 (未验证) 提交于 2019-12-03 08:59:04
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have made a setup of multi-master replication of PostgreSQL using BDR (Bi-Directional Replication) among 4 nodes (virtual machines). Now i want to put a load-balancer for High Availability. For this i have installed and configured "HAProxy" on a different virtual machine, which is listening over 5432/tcp to connect. The haproxy configuration is as follows: listen pgsql_bdr *:5432 mode tcp option httpchk balance roundrobin server master 192.168.123.1:5432 check backup server slave1 192.168.123.2:5432 check server slave2 192.168.123.3:5432

Error response from daemon: (config) includes invalid characters for a local volume name

匿名 (未验证) 提交于 2019-12-03 08:59:04
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a running node server which listens on 3 different ports. I have three different subdomains of a url pointing to port 80 of the server on which node is running/listening. What I am trying to do is proxy pass a request from a sub-domain to its respective port using haproxy . My node server is dockerized with the ports exposed on the host. I can hit them individually using the server's IP address on their port so they seem to be running fine. My haproxy will also be running inside a docker container. I am completely new to haproxy

haproxy - unable to load SSL private key from PEM file

匿名 (未验证) 提交于 2019-12-03 08:33:39
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: haproxy does not start anymore, it shows the error bind <ip>:443' : unable to load SSL private key from PEM file ... We did not change anything on the certificates or configuration. Since the last start we only made normal updates to the system. To find the error, I generated a completely new certificate (self signed) but the error still exists. This is the structure of the PEM file: -----BEGIN CERTIFICATE----- MIIDXjCCAkY... -----END CERTIFICATE----- -----BEGIN RSA PRIVATE KEY----- MIIEpgIBAAKC.... -----END RSA PRIVATE KEY----- I also tried

Apache Tomcat 7 Changing JSESSIONID on Every Request

雨燕双飞 提交于 2019-12-03 08:11:43
This issue is driving me insane, so maybe someone could help me understand what the issue is. I have a tomcat web application being fronted by HAProxy. HAProxy is also doing SSL offloading, and is configured to use sticky sessions. I am using Tomcat's session replication feature which seems to be working just fine. The sessions appear on both appservers. For some reason, Tomcat is generating a new JSESSIONID for every single web request, and then copying the contents of the old session into the new session. That is to say, my session contents are still there within the new session, but a new

mysql复制+keepalived+haproxy配置(负载均衡)

 ̄綄美尐妖づ 提交于 2019-12-03 04:48:58
双主+keepalived+haproxy配置(负载均衡) 实验系统:CentOS 6.5_x86_64 实验前提:防火墙和selinux都关闭 实验软件:keepalived-1.2.13  haproxy-1.8.13  mysql—5.7.21 主1 ip:192.168.226.134 主2 ip:192.168.226.135 vip 192.168.226.150 一、安装mysql 获取mysql安装包:wget https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.21-linux-glibc2.12-x86_64.tar.gz 安装mysql过程省略 二、配置主主复制 命令 service iptables stop 检查:service iptables status 关闭vi /etc/selinux/config SELINUX=disabled 两台服务器上都要执行: 创建复制用户 grant replication slave on *.* to 'repl'@'%' identified by '123'; 进入从服务器mysql 命令: # mysql -uroot -p 关闭slave 命令:stop slave; 开始配置: 输入下面代码即可: CHANGE MASTER TO

Load balancing since Node v0.12.2 - cluster, pm2 or nginx

久未见 提交于 2019-12-03 03:24:09
With Node v0.12.2, the cluster module supports Round-Robin (RR) load balancing , which ensures load is more evenly distributed than the previous OS-level load balancing. So now we are spoilt for choice: Use the cluster module Use pm2 which uses the cluster module under the hood Use nginx Use HAProxy I am aware of this excellent post as well as other answers here on SO, but none have addressed the newer Cluster module with RR mode. So the question boils down to: Judging only on their load balancing capabilities, should I use pm2 or nginx ? TL;DR If it's just pm2 vs. nginx go for nginx. Better :

How to send a response with HAProxy without passing the request to web servers

守給你的承諾、 提交于 2019-12-03 03:01:38
The server is receiving thousands of OPTIONS requests due to CORS (Cross-Origin Resource Sharing). Right now, every options request is being sent to one of the servers, which is a bit wasteful, knowing that HAProxy can add the CORS headers itself without the help of a web server. frontend https-in ... use_backend cors_headers if METH_OPTIONS ... backend cors_headers rspadd Access-Control-Allow-Origin:\ https://www.example.com rspadd Access-Control-Max-Age:\ 31536000 However for this to work I need to specify at least one live server in cors_headers backend and that server will still receive