Haproxy Hidden backend server information and Haproxy implementation compression

Source: Internet
Author: User
Tags haproxy

1. Hide back-end server versions

In our daily work we use haproxy as a load balancer, because the backend application server is more cumbersome to change, so it is decided to implement it in the load balancer.

Only need to frondend or listen or backend, add

Rspidel ^server:.* rspidel ^x-forwarded-for:.* rspidel ^x-powered-by:.* rspidel ^via:.* rspide L ^x-aspnet-version:*

The above use can refer to Rspidel.

In addition, if you need to confuse some people to add response headers as needed, you can use Rspadd.

Rspadd server:\ Aws


2.Haproxy Add compression function (for Haproxy 1.5 or later, not supported in 1.4 and below)

Add in Global

Tune.comp.maxlevel 9 #压缩级别 maxcompcpuusage #压缩最大可使用CPU资源为50%

Add in Defaults

Compression Algo gzip #压缩算法 compression type text/html text/plain application/x-javascript text/css application/ XML #压缩文件类型 Compression Offload #使用本地压缩方式





This article is from "Maple Night" blog, please be sure to keep this source http://fengwan.blog.51cto.com/508652/1692175

Haproxy Hidden backend server information and Haproxy implementation compression

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.