diff options
author | rh <rh> | 2001-08-21 12:00:14 +0000 |
---|---|---|
committer | rh <rh> | 2001-08-21 12:00:14 +0000 |
commit | 439c5a239889fb5aded21b78b48bea540df98b4f (patch) | |
tree | 7013a929e06da097c974d38e1ac6c4cff53ae410 /net | |
parent | 7ea48f52b6de7fbff64090001d4895fa5de5938f (diff) | |
download | pkgsrc-439c5a239889fb5aded21b78b48bea540df98b4f.tar.gz |
Initial import of pen-0.2.0, a simple TCP load balancer and failover
manager.
Diffstat (limited to 'net')
-rw-r--r-- | net/pen/Makefile | 25 | ||||
-rw-r--r-- | net/pen/distinfo | 6 | ||||
-rw-r--r-- | net/pen/patches/patch-aa | 28 | ||||
-rw-r--r-- | net/pen/patches/patch-ab | 40 | ||||
-rw-r--r-- | net/pen/pkg/DESCR | 20 | ||||
-rw-r--r-- | net/pen/pkg/PLIST | 9 |
6 files changed, 128 insertions, 0 deletions
diff --git a/net/pen/Makefile b/net/pen/Makefile new file mode 100644 index 00000000000..6d886f681f7 --- /dev/null +++ b/net/pen/Makefile @@ -0,0 +1,25 @@ +# $NetBSD: Makefile,v 1.1.1.1 2001/08/21 12:00:14 rh Exp $ +# + +DISTNAME= pen-0.2.0 +CATEGORIES= net +MASTER_SITES= http://siag.nu/pub/pen/ \ + ftp://siag.nu/pub/pen/ + +MAINTAINER= rh@netbsd.org +HOMEPAGE= http://siag.nu/pen/ +COMMENT= load balancer for "simple" tcp based protocols + +NO_CONFIGURE= YES + +do-install: +.for prg in pen mergelogs + ${INSTALL_PROGRAM} ${WRKSRC}/${prg} ${PREFIX}/sbin + ${INSTALL_MAN} ${WRKSRC}/${prg}.1 ${PREFIX}/man/man8/${prg}.8 +.endfor + ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/pen +.for doc in COPYING ChangeLog README + ${INSTALL_DATA} ${WRKSRC}/${doc} ${PREFIX}/share/doc/pen +.endfor + +.include "../../mk/bsd.pkg.mk" diff --git a/net/pen/distinfo b/net/pen/distinfo new file mode 100644 index 00000000000..7a60c13bbad --- /dev/null +++ b/net/pen/distinfo @@ -0,0 +1,6 @@ +$NetBSD: distinfo,v 1.1.1.1 2001/08/21 12:00:14 rh Exp $ + +SHA1 (pen-0.2.0.tar.gz) = d16daa8e32276d7e874d2811cd800c2659694455 +Size (pen-0.2.0.tar.gz) = 17469 bytes +SHA1 (patch-aa) = 6ce188b309bbd51e4c7f4ece3c666340e6790ddf +SHA1 (patch-ab) = e3c0dfeafc74cf653de4c90b8b6244e4a2bcae8f diff --git a/net/pen/patches/patch-aa b/net/pen/patches/patch-aa new file mode 100644 index 00000000000..a4125362d39 --- /dev/null +++ b/net/pen/patches/patch-aa @@ -0,0 +1,28 @@ +$NetBSD: patch-aa,v 1.1.1.1 2001/08/21 12:00:14 rh Exp $ + +--- Makefile.orig Mon Aug 20 21:02:54 2001 ++++ Makefile +@@ -3,11 +3,11 @@ + PKG = pen + THIS = $(PKG)-$(VERSION) + +-CC = gcc ++#CC = gcc + + # Try this first +-CFLAGS = `./guess --cflags` +-LDFLAGS = `./guess --libs` ++#CFLAGS = `./guess --cflags` ++#LDFLAGS = `./guess --libs` + + # For Linux + #CFLAGS = -Wall -g +@@ -16,7 +16,7 @@ + #CFLAGS = -Wall -g + #LDFLAGS = -lnsl -lsocket + +-PREFIX = /usr/local ++#PREFIX = /usr/local + BINDIR = $(PREFIX)/bin + MANDIR = $(PREFIX)/man + MAN1DIR = $(MANDIR)/man1 diff --git a/net/pen/patches/patch-ab b/net/pen/patches/patch-ab new file mode 100644 index 00000000000..03c6c659e7b --- /dev/null +++ b/net/pen/patches/patch-ab @@ -0,0 +1,40 @@ +$NetBSD: patch-ab,v 1.1.1.1 2001/08/21 12:00:14 rh Exp $ + +--- pen.c.orig Mon Aug 20 21:02:54 2001 ++++ pen.c +@@ -33,6 +33,7 @@ + #include <sys/socket.h> + #include <sys/types.h> + #include <sys/stat.h> ++#include <sys/param.h> + #include <fcntl.h> + #include <unistd.h> + #include <syslog.h> +@@ -465,6 +466,7 @@ + exit(0); + } + ++#if !(defined(BSD) && BSD >= 199306) + static void background(void) + { + int childpid; +@@ -478,6 +480,7 @@ + setpgrp(); + signal(SIGCHLD, SIG_IGN); + } ++#endif + + static void init(int argc, char **argv) + { +@@ -817,7 +820,11 @@ + signal(SIGCHLD, SIG_IGN); + + if (!foreground) { ++#if (defined(BSD) && BSD >= 199306) ++ daemon(0, 0); ++#else + background(); ++#endif + } + + listenfd = open_listener(argv[0]); diff --git a/net/pen/pkg/DESCR b/net/pen/pkg/DESCR new file mode 100644 index 00000000000..866200b66fa --- /dev/null +++ b/net/pen/pkg/DESCR @@ -0,0 +1,20 @@ +Pen is 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. diff --git a/net/pen/pkg/PLIST b/net/pen/pkg/PLIST new file mode 100644 index 00000000000..3dcfb80d472 --- /dev/null +++ b/net/pen/pkg/PLIST @@ -0,0 +1,9 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 2001/08/21 12:00:14 rh Exp $ +man/man8/pen.8 +man/man8/mergelogs.8 +sbin/pen +sbin/mergelogs +share/doc/pen/COPYING +share/doc/pen/ChangeLog +share/doc/pen/README +@dirrm share/doc/pen |