| 注册
请输入搜索内容

热门搜索

Java Linux MySQL PHP JavaScript Hibernate jQuery Nginx
jopen
8年前发布

hostsplitter: HTTP反向代理和负载平衡器

HostSplitter

HostSplitter是一个HTTP反向代理和负载平衡器,它将基于主机头将请求分发至任意数量的网站

Motivation

I commonly run into an issue developing small golang websites: I want to use the same IP address for many sites that aren't large enough to justify their own server.

Site files

HostSplitter will look for site files by default in "/etc/hostsplitter/". HostSplitter will only read files with the .json extension.

A each site file should look like

{      "hostnames": [          "ammar.io",          "www.ammar.io"      ],      "backends": [          "127.0.0.1:9000"      ],      "secret": "puppies1234"  }

The "secret" field is passed along with every request to that site in the X-Hostsplitter-Secret header. This is intended to be checked before trusting the passed along IP.

Real IP

The original requester's IP is located in the X-Forwarded-For header.

Reloading

HostSplitter provides 0 downtime reload functionality via SIGUSR1. E.g

pkill -10 hostsplitter

Roadmap

  • SSL

项目地址: https://github.com/ammario/hostsplitter

 本文由用户 jopen 自行上传分享,仅供网友学习交流。所有权归原作者,若您的权利被侵害,请联系管理员。
 转载本站原创文章,请注明出处,并保留原始链接、图片水印。
 本站是一个以用户分享为主的开源技术平台,欢迎各类分享!
 本文地址:https://www.open-open.com/lib/view/open1454756275776.html
集群/负载均衡