负载均衡调度器-Pen
Pen 是一个简单的负载平衡器,支持基础协议的TCP如HTTP或SMTP。它允许多个服务器上显示为一个外部和自动检测服务器上,以减少现有服务器和客户之间的开销。这使高可用性和可扩展的性能。该负载平衡算法跟踪客户,并尝试将它们发送回服务器,他们的最后一次访问。客户端表有若干插槽(默认2048 ,设置通过命令行参数) 。当表已满,则最近使用的人会被处理掉,以腾出空间给新的。
当 Pen 检测到服务器不可用,它会扫描再从该服务器后,最近使用过的一个。这样我们得到的负载平衡和“公平”的。
This is pen, a load balancer for "simple" tcp based protocols such as http or smtp. It allows several servers to appear as one to the outside and automatically detects servers that are down and distributes clients among the available servers. This gives high availability and scalable performance.
The load balancing algorithm keeps track of clients and will try to send them back to the server they visited the last time. The client table has a number of slots (default 2048, settable through command-line arguments). When the table is full, the least recently used one will be thrown out to make room for the new one.
This is superior to a simple round-robin algorithm, which sends a client that connects repeatedly to different servers. Doing so breaks applications that maintain state between connections in the server, including most modern web applications.
When pen detects that a server is unavailable, it scans for another starting with the server after the most recently used one. That way we get load balancing and "fair" failover for free.
最新版本:0.2
此版本支持除了 Internet sockets 之外的 Unix domain sockets,这个特性提供给 "main" 监听套接字和控制套接字,允许使用 Unix 文件权限进行访问控制;更新了文档,说明了什么是控制套接字及其作用。
项目主页:http://siag.nu/pen/