HAproxy

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

本小妞迷上赌 提交于 2019-12-14 00:33:21
问题 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

use environment variables in haproxy

北城余情 提交于 2019-12-13 15:39:14
问题 Hoping someone can point me in the right direction. I am trying to configure HAProxy to use an environment variable (from the operating system) as part of an acl statement. So if the environment variable is set to true when HAProxy is started or reloaded then access is granted. If the environment variable is set to false then I would just want the NOSVR error to be generated. I know that if I also put in a rule that says use_backend ftp1-srv unless accessFtp then the request goes through OK

Haproxy搭建Web群集概述

那年仲夏 提交于 2019-12-13 10:18:55
博文目录 一、Haproxy概述 1、HTTP请求 2、负载均衡常用调度算法 3、常见的Web群集调度器 二、Haproxy配置项介绍 1、global配置项通常有下面配置参数: 2、defaults配置项配置默认参数,一般会被应用组件继承,如果在应用组件中没有特别的声明,将安装默认配置参数: 3、listen配置项一般配置应用模块参数: 三、Haproxy的参数优化 一、Haproxy概述 Haproxy是目前比较流行的一种群集调度工具,同类群集调度工具有很多,如LVS和Nginx。相比较而言,LVS性能最好,但是搭建相对复杂;Nginx的upstream模块支持群集功能,但是对群集节点健康检查功能不强,性能没有Haproxy好。Haproxy官方网站是 http://www.haproxy.org/ 。 1、HTTP请求 通过URL访问网站使用的协议是HTTP协议,此类请求一般称为HTTP请求。HTTP请求的方式分为GET方式和POST方式。 当使用浏览器访问某一个URL,会根据请求URL返回状态码,通常正常的状态码为2 X X、3 X X(如200、301),如果出现异常会返回4 X X、5 X X(如400、500)。例如:访问http://www.test.com/a.php?ld=123 ,就是一个GET请求,如果访问正常,会从服务器的日志中获取200状态码

how to redirect http to https on an openshift golang app?

走远了吗. 提交于 2019-12-13 03:50:44
问题 I have a scaled golang application running on the openshift free tier. It uses a custom cartidge located at https://github.com/zolamk/openshift-go and i want to redirect http to https, i tried following the guide at Technical FAQs by using .htaccess file but that didn't work, maybe because haproxy is used as a load balancer, so my question is how can i redirect HTTP traffic to HTTPS without touching my application code if possible? maybe by changing the haproxy.cfg file, here is what my

Read/Read-Write URIs for Amazon Web Services RDS

て烟熏妆下的殇ゞ 提交于 2019-12-13 03:46:15
问题 I am using HAProxy to for AWS RDS (MySQL) load balancing for my app, that is written using Flask. The HAProxy.cfg file has following configuration for the DB listen mysql bind 127.0.0.1:3306 mode tcp balance roundrobin option mysql-check user haproxy_check option log-health-checks server db01 MASTER_DATABSE_ENDPOINT.rds.amazonaws.com server db02 READ_REPLICA_ENDPOINT.rds.amazonaws.com I am using SQLALCHEMY and it's URI is: SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://USER:PASSWORD@127.0.0.1

How to catch/record a “Burst” in HAProxy and/or NodeJS traffic

随声附和 提交于 2019-12-13 03:41:31
问题 We have a real-time service, which gets binary messages from different sources (internal and external), then using a couple of NodeJS instances and one HAProxy instance, configured to route TCP traffic, we deliver them to our end-users and different services who consume the messages. HAProxy version is 1.8.14, NodeJS is 6.14.3, both hosted on a CentOS 7 machine. Now we've got a complex problem with some "burst"s in the outbound interface of HAProxy instance. We are not sure whether the burst

how to dynamically configure haproxy using a command line script?

穿精又带淫゛_ 提交于 2019-12-13 03:26:08
问题 I want to know how I can automatically re-map the url on which a particular app runs via a command line script.For example an app listening on http://206.189.22.155:30000/designer-api/ should be mapped to http://206.189.22.155/designer-api/. I have already tried mapping the URL for a particular app manually by adding the necessary frontend and backend configuration in the haproxy.conf. frontend http-in mode http bind 206.189.22.155:80 acl path-page-designer path_beg -i /designer-api/ use

how to load 3rd party lua libs (installed via luarocks) into haproxy

情到浓时终转凉″ 提交于 2019-12-13 03:20:54
问题 I'm writing lua script that is going to run inside HAproxy using it's Lua API. My script is using socket package which I want to install on my machine. Currently I'm running inside docker and my dockerfile looks like this: FROM haproxy:1.7 RUN apt-get update -y && apt-get install curl luarocks -y RUN luarocks install luasocket EXPOSE 80 9000 COPY 500error.json.http /etc/haproxy/errorfiles/ COPY hello_world.lua /etc/haproxy/scripts/ my script have the next line: local http = require('socket

haproxy backend redirect based on path

一个人想着一个人 提交于 2019-12-13 03:16:30
问题 is there a way to redirect to a specific backend, based on the path? Goal: http://example.com/node1 --> use backend myserver:8080 http://example.com/node2 --> use backend myserver:8081 http://example.com/node3 --> use backend myserver:8082 http://example.com/ --> use backend myserver:8080, 8081, 8082 This is my configuration: frontend ... acl head_domain hdr_beg(host) -i example.com acl head_n1 path_beg -i /node1 acl head_n1_ref hdr_dir(Referer) -i /node1 use_backend be_n1 if head_n1_ref head

Haproxy - HTTP/2 - TLS ALPN - Don't work correctly

霸气de小男生 提交于 2019-12-12 18:29:35
问题 I have a centos 7 server with OpenSSl 1.0.2j fully working. With Nginx working correcly with HTTP/2 but haproxy fail. When I try to run a curl ( is already version 7.51 ) once is enabled alpn h2 I have the following error : curl --http2 -I https://domain:port/file.htm curl: (16) Error in the HTTP2 framing layer If I disabled h2, curl work correctly but of course only connect http 1.1 : curl --http2 -I https://domain.com:port/file.htm HTTP/1.1 200 OK Server: nginx/1.11.6 Date: Fri, 18 Nov 2016