KTCPVS
KTCPVS stands for Kernel TCP Virtual Server. It implements application-level load balancing inside the Linux kernel, so called Layer-7 switching. Since the overhead of layer-7 switching in user-space is very high, it is good to implement it inside the kernel in order to avoid the overhead of context switching and memory copying between user-space and kernel-space. Although the scalability of KTCPVS is lower than that of IPVS (IP Virtual Server), it is flexible, because the content of request is known before the request is redirected to one server.
The system implementation of KTCPVS is illustrated in the following figure.
The kernel threads are used to parse the content of requests, forward them to backend servers according to scheduling rules, and relay data between client and server. The user-space program tcpvsadm is to administrator KTCPVS, it can write the virtual server rules inside the kernel through setsockopt, and read the KTCPVS rules through getsockopt or /proc file system.
At the current stage, we would like to hear some of your feedbacks and suggestions, so that we can work on it in the right direction.
The draft warning below is quite old. [ I have to warn you that this is very very draft code, which I first wrote in May 2000 in order to prove the concept. However, I hadn't touched this code for near one year, but I don't want to see that it becomes garbage, so I release this very very draft code, in order to push myself get time to work on it. :) ]
There are a lot of work to do, such as interface redesign, the correct way to handle requests in the kernel, logging, comparing the server architecture (which one is good, apache-like architecture or event-driven architecture). If you are interested in the development, you are very welcome, hopefully we will make it a useful one in the near future.
Documentation
See the community-contributed KTCPVS documentation at LVS Knowledge Base or the README inside the ktcpvs source code tar ball.
Download
The ChangeLog is available here.
- KTCPVS version 0.0.18 - ktcpvs-0.0.18.tar.gz - December 18, 2004
- KTCPVS version 0.0.17 - ktcpvs-0.0.17.tar.gz - December 8, 2004
- KTCPVS version 0.0.16 - ktcpvs-0.0.16.tar.gz - October 31, 2004
- KTCPVS version 0.0.15 - ktcpvs-0.0.15.tar.gz - July 8, 2003
- KTCPVS version 0.0.14 - ktcpvs-0.0.14.tar.gz - June 14, 2003
- KTCPVS version 0.0.13 - ktcpvs-0.0.13.tar.gz - May 28, 2003
- KTCPVS version 0.0.12 - ktcpvs-0.0.12.tar.gz - April 7, 2003
- KTCPVS version 0.0.11 - ktcpvs-0.0.11.tar.gz - February 22, 2003
- KTCPVS version 0.0.10 - ktcpvs-0.0.10.tar.gz - February 14, 2003
- KTCPVS version 0.0.9 - ktcpvs-0.0.9.tar.gz - May 26, 2002
- KTCPVS version 0.0.8 - ktcpvs-0.0.8.tar.gz - May 11, 2002
- KTCPVS version 0.0.7 - ktcpvs-0.0.7.tar.gz - April 20, 2002
- KTCPVS version 0.0.6 - ktcpvs-0.0.6.tar.gz - April 12, 2002
- KTCPVS version 0.0.5 - ktcpvs-0.0.5.tar.gz - December 21st, 2001
- KTCPVS version 0.0.4 - ktcpvs-0.0.4.tar.gz - October 16th, 2001
- KTCPVS version 0.0.3 - ktcpvs-0.0.3.tar.gz - October 11th, 2001
- KTCPVS version 0.0.2 - ktcpvs-0.0.2.tar.gz - May 17th, 2001
- KTCPVS version 0.0.1 - ktcpvs-0.0.1.tar.gz - May 8th, 2001
Source code via Subversion
What's Subversion? Subversion is a system for revision control, and is designed to be a modern replacement of CVS. Start at subversion.tigris.org to learn more and read the Subversion Book.
To browse around or download a few individual files, click http://svn.linuxvirtualserver.org/repos/ktcpvs/.
To check out the sources, you need to be running Subversion client. For example, you can enter the following commands for checking out the latest source code of ktcpvs:
svn co http://svn.linuxvirtualserver.org/repos/ktcpvs/trunk/ ktcpvs
To check out the latest stable 0.0.xx source code of ktcpvs, need to use the branch "ktcpvs-0-0-stable" in the Subversion checkout command.
svn co http://svn.linuxvirtualserver.org/repos/ktcpvs/branches/ktcpvs-0-0-stable/ ktcpvs
Once you've checked out a copy of the source tree, you can update your source tree at any time so it is in sync with the latest one by running the command:
svn update
If you make some changes of the source code, please generate the diff file and submit it to the mailing list or sent it to me for inclusion.
svn diff
Developers
The current developers of KTCPVS are as follows (in alphabetical order by last name):
- Hai Long < david_lung at yahoo dot com >
- Wensong Zhang < wensong at linux-vs dot org >