HAproxy

Keepalived+Haproxy实现高可用负载均衡

 ̄綄美尐妖づ 提交于 2020-01-05 11:30:42
高可用负载(主备节点)部署步骤 完成下图一个简单的高可用负载机制: 1.拷贝keepalived-1.2.19.tar.gz至Linux的/home目录(也可以是其它目录) 2.解压并安装keepalived: tar -zxvf keepalived-1.2.19.tar.gz yum install popt-devel yum -y install openssl-devel cd keepalived-1.2.19 ./configure make && make install 这样keepalived编译及安装完成! 3.拷贝并复制keepalived: cp /usr/local/etc/rc.d/init.d/keepalived /etc/rc.d/init.d/ cp /usr/local/etc/sysconfig/keepalived /etc/sysconfig/ mkdir /etc/keepalived cp /usr/local/etc/keepalived/keepalived.conf /etc/keepalived/ cp /usr/local/sbin/keepalived /usr/sbin/ 上传并覆盖keepalived.conf至/etc/keepalived 备注:keepalived.conf详见步骤4 上传check

Multiple jails one public ipaddress no nat

穿精又带淫゛_ 提交于 2020-01-05 04:03:33
问题 My question is pretty simple. I have scoured the web and cannot discern from what i have read how to implement the following. My question is simple. Is the following possible and can someone point me to a thorough article discussing this? I am new to networking. I run a FreeBSD 11.1-RELEASE dedicated server. I have built several jails two of which will run Apache 24 / php72. I have multiple domain names pointing to the same public ip address. I want to forward all port 80 and 443 traffic to

Extra space in HTTP headers gives 400 error on HAProxy

一笑奈何 提交于 2020-01-03 02:22:15
问题 We switched from citrix to HAProxy for load balancing recently. The Problem is that for some requests HAProxy started giving a 400 Error (Which used to work well on citrix). So we moved to TCP based load balancing from a HTTP based load balancing for the time being. On further investigating we found that some requests had an extra space in the HTTP header which caused the 400 error. profileID<space>:value vs profileID:value And these requests came from the android app so we are not able to

How to load balance Kafka Boostrap with haproxy?

和自甴很熟 提交于 2020-01-02 08:19:23
问题 I have a kafka cluster consisting of 3 machines running on AWS: kafka1 to kafka3 I'm using the new style kafka consumers (>0.8). I know that the kafka client connects to one of the kafka servers, grabs server metadata and then connects to the brokers directly. I want to ensure that in the case of a broker failure that the clients are still able to grab metadata. For this I have an HAProxy load balancer with the following config: listen kafka bind *:9092 mode tcp balance roundrobin no option

How to route traffic (reverse Proxy) with HAProxy based on request body

我的梦境 提交于 2020-01-02 05:40:15
问题 I am attempting to route the following request to the appropriate servers based on the URL identified in the POST body below. I am hoping to accomplish this via a reverse proxy using HAProxy. E.g. I would like to direct all requests to HAProxy, than have HAProxy check if certain values exist in the POST body (E.g. the notification url value "pingpong"), and if this is the case, route the traffic to an endopint I will specify in the configs. POST /someURL/file.jsp HTTP/1.1 Host: 10.43.90.190

Configure HAProxy for rabbitmq

你离开我真会死。 提交于 2020-01-01 06:38:28
问题 I want to use HAProxy as a load balancer. I want to put two rabbitmq server behind haproxy. Both the rabbitmq server are on different instance of EC2. I have configure HAProxy server by following this reference. I works but the problem is messages are not published in roundrobin pattern. Messages are publish only on one server. Is there any different configuration for my requirement? My configureation in /etc/haproxy/haproxy.cfg listen rabbitmq 0.0.0.0:5672 mode tcp stats enable balance

Apache Tomcat 7 Changing JSESSIONID on Every Request

时光怂恿深爱的人放手 提交于 2020-01-01 03:10:06
问题 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

HAProxy Loadbalancing TCP traffic

别来无恙 提交于 2019-12-31 09:05:12
问题 Using HAProxy, I'm trying to (TCP) load balance Rserve(a service listening in TCP socket for calling R scripts) running at port 6311 in 2 nodes. Below is my config file. When I run HAProxy, its statting without any issues. But when I connect to the balanced nodes, getting below error. Anything wrong with the config? Handshake failed: expected 32 bytes header, got -1 #--------------------------------------------------------------------- # Global settings #--------------------------------------

[原]HAproxy 代理技术原理探究

╄→尐↘猪︶ㄣ 提交于 2019-12-31 02:04:11
HAproxy 技术分享 简介 HAProxy是一款提供高可用性、负载均衡以及基于TCP(第四层)和HTTP(第七层)应用的代理软件 Features 1.免费 2.能够做到4层以上代理 3.高性能 4.高稳定性 使用案例 淘宝CDN(HTTP反向代理) 测试: HTTP代理 ab -i -c 500 -n 100000 | --- node 8910 URL = / HAproxy| --- node 8911 URL = / | --- node 8912 URL = / | --- node 8913 /test/ (reqisetbe ^[^\ ]*\ /(test|uri)/ server_uri_route) #按照规则转发 ####### haproxy : (单独由haproxy进行均衡负载) Concurrency Level: 500 Time taken for tests: 32.562 seconds Complete requests: 100000 Failed requests: 0 Write errors: 0 Total transferred: 36606588 bytes HTML transferred: 0 bytes Requests per second: 3071.02 [#/sec] (mean) Time per

HAProxy random HTTP 503 errors

旧巷老猫 提交于 2019-12-30 00:58:51
问题 We've setup 3 servers: Server A with Nginx + HAproxy to perform load balancing backend server B backend server C Here is our /etc/haproxy/haproxy.cfg : global log /dev/log local0 log 127.0.0.1 local1 notice maxconn 40096 user haproxy group haproxy daemon defaults log global mode http option httplog option dontlognull retries 3 option redispatch maxconn 2000 contimeout 50000 clitimeout 50000 srvtimeout 50000 stats enable stats uri /lb?stats stats realm Haproxy\ Statistics stats auth admin