Perlbal is our Perl-based reverse proxy load balancer and web server

转载 2007年10月03日 18:45:00
原贴:http://www.ourlinux.net/date/2007/03/

Perlbal

Perlbal is our Perl-based reverse proxy load balancer and web server.

Overview

Perlbal is a single-threaded event-based server supporting HTTP load balancing, web serving, and a mix of the two (see below).

One of the defining things about Perlbal is that almost everything can be configured or reconfigured on the fly without needing to restart the software. A basic configuration file containing a management port enables you to easily perform operations on a running instance of Perlbal.

Here is a basic list of the personalities and features that Perlbal implements at this time.

Role: Web Server

  • Listen on a port, share from a directory
  • Directory indexing
  • Byte range support (clients can resume downloads)
  • Can have directory index requests fall back to index file list
    • I.e., requests for /foo/ go to /foo/index.html instead
    • Multiple index files supported, tries one at a time until it finds one
  • Persistent client connections (configurable)
  • Almost all1 disk operations are done asynchronously as to not stall the event loop
  • Configurable support for storing files (PUT, DELETE support)

1 Almost. When you enable PUT support, the close() operation is blocking. However, it’s generally pretty fast (we’ve had no problems). Also, directory indexing is a synchronous operation.

Role: Reverse Proxy

  • Maintains pool of connected backend connections to reduce turnover
  • Gets list of nodes either from asynchronously monitored node file, or from in-server pool objects which you can add/remove nodes from using the management interface.
  • Intelligent load balancing based on what backend connections are free for a new request. No unreliable “weighting” numbers required.
  • Can verify (using a quick OPTIONS request) that a backend connection is talking to a webserver and not just the kernel’s listen queue before sending client requests at it. Lower latency for the client.
  • Has a high priority queue for sending requests through to backends quickly
    • Uses cookies to determine if a request should go to fast queue (configurable)
    • Highpri (high priority) plugin supports making requests high priority by URI or Host
    • Can specify a relief level to let low priority requests through to prevent starvation
  • Can allow X-Forwarded-For (and similar) headers from client based on client IP
  • Configurable header management before sending request to backend
  • Internal redirection to file or URL(s)
    • Big one for us; a backend can instruct Perlbal to fetch the user’s data from a completely separate server and port and URL, 100% transparent to the user
    • Can actually give Perlbal a list of URLs to try. Perlbal will find one that’s alive. Again, the end user sees no redirects happening.
    • Can also redirect to a file, which Perlbal will serve non-blocking. See webserver mode above.
  • Persistent client connections (configurable)

Statistics and Monitoring

  • CPU usage (user, system)
  • Total requests served across all services
  • Requests service by individual backends
  • Perlbal uptime
  • All connected sockets (and tons of info about each)
  • Outstanding connections to backends
  • Backends that have recently failed verification
  • Pending backend connections by service
  • Total of all socket states by socket type
  • Size (in seconds and number of connections) of all queues
  • State of reproxy engine (queued requests, outstanding requests, backends)
  • Loaded plugins per service

(All statistics are in machine readable form, easy to parse and write scripts that check on the status of Perlbal!)

Plugins (Extensibility)

Perlbal supports the concept of having per-service (and global) plugins that can override many parts of request handling and behavior. We have written custom plugins that send new headers to the backends, promote requests to the fast queue, maintain more detailed statistics, do image header manipulation, and more…

For more information on how plugins work, see the plugins directory in the distribution. They’re fairly self-explanatory.

Much more documentation needs to happen…

具体的安装方法可以见这里: http://wiki.ourlinux.net/pmwiki.php?n=Main.Perlbal

zuul 集群报错 Load balancer does not have available server for client

如果想把/session/** 请求转发到多个外部服务器,则需要配置集群 zuul: # 重定向 # add-host-header: true routes: session-...
  • ID19870510
  • ID19870510
  • 2018年01月21日 10:09
  • 255

Load Balancing in a Cluster (集群中的负载均衡)

Load Balancing in a Cluster This section describes the load balancing support that a WebLogic Server...
  • wonder4
  • wonder4
  • 2006年11月22日 13:34
  • 6081

【翻译】Reverse Proxy Guide 反向代理指南

翻译自:https://httpd.apache.org/docs/2.4/en/howto/reverse_proxy.html 反向代理简例 负载均衡简例 故障转移...
  • hjd199464
  • hjd199464
  • 2017年02月07日 15:58
  • 255

Load balancer does not have available server for client

eureka服务器的客户端(服务消费端)如果在fetchRegistry设置为false的情况下 Feigh一端启动的时候 会报错 eureka: client: registerWi...
  • ID19870510
  • ID19870510
  • 2018年01月10日 14:41
  • 503

逆向代理服务器(Reverse Proxy)原理及用途

本文内容翻译自 wiki:Reserve server 有逆向代理服务器,肯定就有正向的代理服务器(Proxy Server),下面介绍他们的原理 Proxy Servr原理: ...
  • aFeiOnePiece
  • aFeiOnePiece
  • 2015年04月21日 15:22
  • 2809

Failed to start A high performance web server and a reverse proxy server 错误提示

点击打开链接 I am running nginx on Raspbian Jessie operating system. I just created new virtual ...
  • qq_14989227
  • qq_14989227
  • 2017年10月20日 15:23
  • 1848

nginx 安装失败 没有/etc/nginx目录

Failed to start A high performance web server and a reverse proxy server sudo apt-get --purge auto...
  • xp5xp6
  • xp5xp6
  • 2017年01月18日 16:07
  • 3359

Spring cloud - Feign / Eureka load balance does not and connetion refused

一次feign调用失败的经历
  • bugnuke123
  • bugnuke123
  • 2017年06月14日 22:45
  • 574

利用Linux架构负载均衡(Load balancer)系统(一)

引言: Linux在网络方面具有很强大的功能。可以用Linux架构Firewall(防火墙), IDS(入侵检测),Cache&Proxy,大型的mail 系统, 甚至高端的路由器等,无所不能。本文介...
  • wiregate
  • wiregate
  • 2004年12月23日 09:40
  • 3845

负载均衡 反向代理为何叫反向代理?

转  https://www.zhihu.com/question/24723688 与正向代理比起来,反向代理是什么东西反向了? 关注者 1217 ...
  • u010690818
  • u010690818
  • 2017年09月26日 17:08
  • 199
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:Perlbal is our Perl-based reverse proxy load balancer and web server
举报原因:
原因补充:

(最多只允许输入30个字)