1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203
|
lbcd version 3.5.2
(responder for load balancing)
Maintained by Russ Allbery <eagle@eyrie.org>
Copyright 1993, 1994, 1996, 1997, 1998, 2000, 2003, 2004, 2005, 2006,
2007, 2008, 2009, 2012, 2013, 2014 The Board of Trustees of the Leland
Stanford Junior University. This software is distributed under a
BSD-style license. Please see the section LICENSE below for more
information.
BLURB
lbcd is a daemon that runs on a UNIX system and answers UDP queries with
information about system load, number of logged-on users, uptime, and
free /tmp space. This information can be used to accumulate system
status across a cluster with light-weight queries or can be used as
input to a load-balancing system to choose the best system to which to
direct new incoming connections.
DESCRIPTION
The lbcd daemon runs on a UNIX system and answers UDP queries (by
default on port 4330) with information about system load, number of
logged on users, uptime, and free /tmp space. This information can be
used to accumulate system status across a cluster with light-weight
queries or can be used as input to a load-balancing system to choose
the best system to which to direct new incoming connections. It was
designed for use with the lbnamed DNS load balancer, available at:
<http://www.stanford.edu/~riepel/lbnamed/>
It was originally written by Roland Schemers, was rewritten by Larry
Schwimmer to add protocol version 3 with some additional features and
service probing, and is currently maintained by Russ Allbery.
The information provided isn't particularly sophisticated, and a good
hardware load balancer will be able to consider such things as
connection latency and responsiveness to make better decisions, but lbcd
with lbnamed works quite well for smaller scale problems, scales well to
multiple load balance pools for different services, and is much simpler
and cheaper to understand and deploy.
Included in this package is a small client program, lbcdclient, which
can query an lbcd server and display a formatted version of the returned
information.
REQUIREMENTS
lbcd is written in C, so you'll need a C compiler. It also uses kernel
calls to obtain load and uptime information, and at present has only
been ported to Linux, Solaris, AIX, various BSD systems, Mac OS X,
HP-UX, IRIX, and Tru64. It is currently primarily tested on Linux.
Platforms not listed may require some porting effort, as may old or
unusual platforms that aren't regularly tested.
The lbcdclient program requires Perl 5.6 or later. For IPv6 support, it
requires the IO::Socket::INET6 module. It will fall back on only using
IPv4 if that module is not available.
To run the full test suite, Perl 5.6.2 or later is required. The
following additional Perl modules will be used if present:
Test::MinimumVersion
Test::Perl::Critic
Test::Pod
Test::Spelling
Test::Strict
All are available on CPAN. Those tests will be skipped if the modules
are not available.
To enable tests that don't detect functionality problems but are used to
sanity-check the release, set the environment variable RELEASE_TESTING
to a true value. To enable tests that may be sensitive to the local
environment or that produce a lot of false positives without uncovering
many problems, set the environment variable AUTHOR_TESTING to a true
value.
To bootstrap from a Git checkout, or if you change the Automake files
and need to regenerate Makefile.in, you will need Automake 1.11 or
later. For bootstrap or if you change configure.ac or any of the m4
files it includes and need to regenerate configure or config.h.in, you
will need Autoconf 2.64 or later.
INSTALLATION
You can build and install remctl with the standard commands:
./configure
make
make install
Pass --enable-silent-rules to configure for a quieter build (similar to
the Linux kernel). Use make warnings instead of make to build with full
GCC compiler warnings (requires a relatively current version of GCC).
The last step will probably have to be done as root. By default, remctl
installs itself under /usr/local; you can change that path by passing
the --prefix=PATH argument to configure.
lbcd looks for $sysconfdir/nolbcd and returns the maximum load if that
file is present, allowing one to effectively drop a system out of a
load-balanced pool by touching that file. By default, the path is
/usr/local/etc/nolbcd, but you may want to pass --sysconfdir=/etc to
configure to use /etc/nolbcd.
lbcdclient is written in Perl, so you may have to edit the first line of
the script to point to the correct Perl location on your system. It
does not use any sophisticated Perl features or add-on modules.
You will generally want to start lbcd at system boot. All that is
needed is a simple init script to start lbcd with the appropriate
options or kill it again. It writes its PID into /var/run/lbcd.pid by
default (and this can be changed with the -P option). On many systems,
lbcd will need to run as root or as a member of particular groups to
obtain system load average and uptime information.
TESTING
lbcd comes with a rudimentary test suite, which you can run after
building lbcd with:
make check
If a test case fails, please run the that individual test case with
verbose output using:
tests/runtests -o <name-of-test>
and send me the output when reporting the problem. Currently, the test
suite only checks the portability and utility libraries; tests for lbcd
and lbcdclient are coming in later releases.
SUPPORT
The lbcd web page at:
http://www.eyrie.org/~eagle/software/lbcd/
will always have the current version of this package, the current
documentation, and pointers to any additional resources.
New lbcd releases are announced on the low-volume lbnamed-users mailing
list. To subscribe or see the list archives, go to:
https://mailman.stanford.edu/mailman/listinfo/lbnamed-users
I welcome bug reports and patches for this package at eagle@eyrie.org.
However, please be aware that I tend to be extremely busy and work
projects often take priority. I'll save your mail and get to it as soon
as I can, but it may take me a couple of months.
SOURCE REPOSITORY
lbcd is maintained using Git. You can access the current source by
cloning the repository at:
git://git.eyrie.org/system/lbcd.git
or view the repository via the web at:
http://git.eyrie.org/?p=system/lbcd.git
When contributing modifications, patches (possibly generated by
git-format-patch) are preferred to Git pull requests.
LICENSE
The lbcd package as a whole is covered by the following copyright
statement and license:
Copyright 1993, 1994, 1996, 1997, 1998, 2000, 2003, 2004, 2005, 2006,
2007, 2008, 2009, 2012, 2013, 2014 The Board of Trustees of the
Leland Stanford Junior University
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
All individual files without an explicit exception below are released
under this license. Some files may have additional copyright holders as
noted in those files. There is detailed information about the licensing
of each file in the LICENSE file in this distribution.
Some files in this distribution are individually released under
different licenses, all of which are compatible with the above general
package license but which may require preservation of additional
notices. All required notices are preserved in the LICENSE file.
|