GithubHelp home page GithubHelp logo

pen's Introduction

This is pen, a load balancer for udp and tcp based protocols such as
dns, 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.

Correctly configured, pen can ensure that a server farm is always
available, even when individual servers are brought down for maintenance
or reconfiguration. The final single point of failure, pen itself,
can be eliminated by running pen on several servers, using vrrp to
decide which is active.


A side-effect of load-balancing web servers is that several logfiles
are produced, and by default, Pen operates in a proxy mode that makes
all accesses seem to come from the load balancer.
The program penlogd solves this problem by merging pen's log file
with the ones produced by the web servers. See penlogd(1) and penlog(1)
for details.

The Direct Server Return and Transparent Reverse Proxy modes make
accesses seem to come directly from the client. Multiple logfiles
are still created, and Penlogd can still be used to consolidate them
automatically.


This load balancer is known to work on FreeBSD, Linux, HP-UX and Solaris.
Other Unixes should work as well, possibly requiring trivial changes.
Success stories or problem reports are welcome.


If pen is started with the -w option, statistics are saved in html
format when a USR1 signal is received. The cgi script penstats can
be used to simplify this; it must be edited to reflect local conditions.


I am Ulric Eriksson, [email protected].

pen's People

Contributors

ulrice avatar mirchr avatar vincentbernat avatar alexanders avatar belden avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.