HAproxy

HAProxy - Serving a URL from 2nd machine if the 1st returns a 404

泄露秘密 提交于 2021-02-07 10:22:27
问题 I have a situation where I have part of a website (certain URL paths) being served from one backend server while all other URLs are being served from a different default backend in HAProxy. Now, because of the way the application logic was written, the files to be served under the same URL path could be created at the same path on either of the two physical server machines. I would like to be able to serve these files regardless of which machine the file exists on. So in a nutshell, how can I

HAProxy - Serving a URL from 2nd machine if the 1st returns a 404

拈花ヽ惹草 提交于 2021-02-07 10:21:13
问题 I have a situation where I have part of a website (certain URL paths) being served from one backend server while all other URLs are being served from a different default backend in HAProxy. Now, because of the way the application logic was written, the files to be served under the same URL path could be created at the same path on either of the two physical server machines. I would like to be able to serve these files regardless of which machine the file exists on. So in a nutshell, how can I

How to track down “Connection timout during SSL handshake” and “Connection closed during ssl handshake” errors

倖福魔咒の 提交于 2021-02-07 06:08:03
问题 I have recently switched over to HAProxy from AWS ELB. I am terminating SSL at the load balancer (HAProxy 1.5dev19). Since switching, I keep getting some SSL connection errors in the HAProxy log (5-10% of the total number of requests). There's three types of errors repeating: Connection closed during SSL handshake Timeout during SSL handshake SSL handshake failure (this one happens rarely) I'm using a free StartSSL certificate, so my first thought was that some hosts are having trouble

How to track down “Connection timout during SSL handshake” and “Connection closed during ssl handshake” errors

对着背影说爱祢 提交于 2021-02-07 06:05:51
问题 I have recently switched over to HAProxy from AWS ELB. I am terminating SSL at the load balancer (HAProxy 1.5dev19). Since switching, I keep getting some SSL connection errors in the HAProxy log (5-10% of the total number of requests). There's three types of errors repeating: Connection closed during SSL handshake Timeout during SSL handshake SSL handshake failure (this one happens rarely) I'm using a free StartSSL certificate, so my first thought was that some hosts are having trouble

大云制造 | 大云软负载均衡BC-SLB-C V1.0发布!

不想你离开。 提交于 2021-02-03 15:00:45
友情提示:全文2000多文字,预计阅读时间6分钟 背 景 随着云计算及大数据技术的迅猛发展,流量和后台复杂度越来越高,企业对负载均衡组件的需求越来越强烈。主流的云服务提供商都在第一时间上线了相应的负载均衡服务。而相关的开源软负载均衡组件经过这么多年发展,已经非常成熟,其在X86架构的先天优势,以其兼容性,丰富度,低成本的特性,已经作为云上服务的首选。如果还是沿用采购负载服务器软硬件的方式,成本,运维,扩展等都是很大的问题。移动云急需要一个高性能软负载均衡方案,来满足内部负载,云化快速部署,灵活配置的需求。 面临的挑战 OpenStack原生支持软负载均衡,其中Lbaasv2作为OpenStack社区的标准,提供了丰富的插件和驱动。但是开源负载均衡插件只能在现有的框架下,提供有限的服务,原生最典型的插件就是Haproxy,其有诸多缺点: 功能上不支持UDP,不支持POP/SMTP等邮件协议,不支持扩展功能,重载配置的时候需要重启进程,不支持HTTP缓存也限制了其提供Web服务的能力 性能上由于其框架的限制,多进程支持不够友好,在大并发,高流量的时候存在瓶颈 原生Haproxy插件不支持高可用,不支持多规格服务,无法动态扩容,缺乏云上相关产品、工具、服务等周边 所以原生的Haproxy更多的是作为一个基于Lbaasv2框架的参考实现存在于组件里,或者满足一些没有自主研发能力

Docker从入门到上瘾,万字终极指南!

荒凉一梦 提交于 2021-02-02 14:33:07
容器简介 什么是 Linux 容器 Linux容器是与系统其他部分隔离开的一系列进程,从另一个镜像运行,并由该镜像提供支持进程所需的全部文件。 容器提供的镜像包含了应用的所有依赖项,因而在从开发到测试再到生产的整个过程中,它都具有可移植性和一致性。 更加详细地来说,请您假定您在开发一个应用。您使用的是一台笔记本电脑,而且您的开发环境具有特定的配置。其他开发人员身处的环境配置可能稍有不同。您正在开发的应用依赖于您当前的配置,还要依赖于某些特定文件。 与此同时,您的企业还拥有标准化的测试和生产环境,且具有自身的配置和一系列支持文件。 您希望尽可能多在本地模拟这些环境,而不产生重新创建服务器环境的开销。 因此,您要如何确保应用能够在这些环境中运行和通过质量检测,并且在部署过程中不出现令人头疼的问题,也无需重新编写代码和进行故障修复?答案就是使用容器。 容器可以确保您的应用拥有必需的配置和文件,使得这些应用能够在从开发到测试、再到生产的整个流程中顺利运行,而不出现任何不良问题。这样可以避免危机,做到皆大欢喜。 虽然这只是简化的示例,但在需要很高的可移植性、可配置性和隔离的情况下,我们可以利用 Linux 容器通过很多方式解决难题。 无论基础架构是在企业内部还是在云端,或者混合使用两者,容器都能满足您的需求。 容器不就是虚拟化吗 是,但也不竟然。我们用一种简单方式来思考一下:

好家伙,我直接好家伙!原来吴承恩这厮是个程序员?

与世无争的帅哥 提交于 2021-02-01 09:24:32
前言 这是一个有关计算机网络协议的故事。一家之言,不必当真,欢迎进群973961276交流,并且每个礼拜都会有抽奖送书的活动哦! 一、我佛造经传极乐 话说我佛如来为度化天下苍生,有三藏真经,可劝人为善。 就如图中所示,真经所藏之处,在于云端。佛祖所管辖之下,有四个区域Region,称为四大部洲, 一是东胜神洲,二是南赡部洲,三是西牛贺洲,四是北俱卢洲。 我佛所在西牛贺洲,是主站点。 在每个区域Region,为保证真经永固,设置多个藏经楼,称为可用区(Available Zone)。 每个藏经楼里面是一排一排的柜子,称为机柜,里面有一排一排的格子,称为服务器,经文就摆放在格子中。 在藏经楼中,柜子根据经文分门别类的组织起来,由不同的神仙进行管理,管理一个柜子的经文的神仙,访问这里面经文的钥匙就在他手里,称为接入层神仙(接入层交换机)。 多个接入层神仙被一组汇聚层神仙(汇聚层交换机)管着,多个汇聚层的神仙被一组核心层神仙(核心交换机)管着。 神仙体系组织严格,层次分明,不同的接入层神仙交换经文,要通过汇聚层神仙同意,不同的汇聚层神仙交换经文,需要核心层神仙同意。 经文的看守要万无一失,因而每一层都是分组看护,互相监督,互相备份,称为堆叠。 虽说每个柜子里面放满了经文,为了防止经文被偷听偷看,经文的内容是被仙术封装在一个虚拟的私密空间里面,虽然有人可能会偷到物质的经文

HAProxy random HTTP 401 errors (File not found)

好久不见. 提交于 2021-01-29 15:07:15
问题 lately i setup my Haproxy server and now randomly 401 Error (File not found) errors occure. And when restarting Haproxy it works for around 10 minutes and than it again happens. Than you can spam F5 and every 3. Page just shows "File not found." OS: Archlinux I will just send the config in here, maybe something is wrong with it: global maxconn 20000 #log /var/log/ local0 log /dev/log local0 info user haproxy chroot /usr/share/haproxy pidfile /run/haproxy.pid daemon defaults log global mode

Using Cloudfront as a HAProxy backend server with https

夙愿已清 提交于 2021-01-28 11:31:55
问题 I have a CloudFront resource sitting in front of my S3 bucket. It's accessible at — https://<id>.cloudfront.net but if I hit — <id>.cloudfront.net:443 I get a 400 Bad Request. I want to point to CloudFront in my HAProxy configuration, but I can't use the 443 port because of the above-mentioned issue. Nor can I use the https URL protocol in the server statement. backend my_cloudfront_app http-response set-header Strict-Transport-Security max-age=31536000 server my_server <id>.cloudfront.net

How do I locally test haproxy when routing based on host name?

给你一囗甜甜゛ 提交于 2021-01-28 05:59:06
问题 I have a fairly complex haproxy configuration that routes to backends based on the host of the request (via acl + hdr_dom). If I want to test the configuration locally, I have to change the resolution of the hosts I want to test (for example, by changing hosts file to resolve host to 127.0.0.1). I can then use wget or curl to test the haproxy configuration locally, and reset the hosts file afterward. However, I want to have automated tests, and changing system level things in an automated