Differences between revisions 3 and 4
Revision 3 as of 2007-04-18 15:10:33
Size: 4885
Editor: ipn36372-c52610
Revision 4 as of 2007-05-03 10:35:18
Size: 4975
Editor: 195
Deletions are marked like this. Additions are marked like this.
Line 11: Line 11:

Note: This seems to be superseded by .

Please check the status of this specification in Launchpad before editing it. If it is Approved, contact the Assignee or another knowledgeable person before making changes.


We will make it easy for a system administrator to configure several edubuntu servers to divide TCs among them evenly.

Note: This seems to be superseded by .


Schools with more thin clients (TCs) than one server can handle currently have to physically partition their networks or use DHCP failover to "load balance" their TCs across multiple servers. Both methods have limitations, because only so much physical partitioning is possible and desirable, and ISC DHCP only supports two failover peers (and the "balancing" with DHCP failover is often uneven).

Use cases

  • Freida is the system administrator for a school with 500 TCs, and she regularly has 300 concurrent users. She has three Edubuntu servers accessing common /home directories via NFS, and authenticating via LDAP. She configures the three Edubuntu servers to divide whole login sessions among themselves to share the load of running user applications across the three servers.
  • Remus is the system administrator for a school with only 40 TCs, but they are spread out in 12 different classrooms, and he can't afford a fast/big enough system to run Edubuntu for all 40 TCs when they are concurrently used. However, he has four relatively recent desktop systems that he can reprovision to be Edubuntu servers. Remus configures these four systems to divide the TC login sessions among themselves so 40 concurrent sessions will be feasible.


This "load balancing" spec is concerned with whole login sessions being directed to one server or another. This "load balancing" spec assumes that authentication and /home are taken care of by other means (such as NFS and LDAP). This "load balancing" spec does NOT address migration of any sessions or processes from one Edubuntu server to another.


The ltsp_config script sets an environment variable ($SERVER) which is then used by ldm to initiate user sessions on the specified $SERVER. ltsp_config could process a list of Edubuntu servers specified in lts.conf and set $SERVER according to criteria defined by the system administrator.

This design will need to address the ssh host keys in /opt/ltsp/i386/etc/ssh/ssh_known_hosts; each Edubuntu server will need the other servers' host keys listed here.

A reasonable default criterion may be to munge the TC MAC address and deterministically connect to a particular server in the list (if that server is currently available).

Here's some untested sample code for the sake of discussion:

pick_app_server() {
    # If this is empty we'll detect that below and print a message.

    # The character range in the sed command here intentionally has a real tab
    # character in it because busybox sed doesn't understand the \t
    # metacharacter.
    APP_SERVERS=`echo ${APP_SERVERS} | sed 's/[ ��������,]\+/ /g'`
    while [ "${APP_DONE}" -ne 1 ]; do
        APP_NUM_SERVERS=`echo "${APP_SERVERS}" | wc -w | sed 's/ //g'`

        if [ "${APP_NUM_SERVERS}" -eq 0 ]; then
            echo "No application server found; rebooting in 1 minute." 1>&2
            sleep 60

        if [ "${APP_RANDOM}" = "true" ]; then
            # Do some deterministic munging of the macaddr
            APP_SERVER_IDX=$((1`ifconfig  | grep HWaddr | head -n1 | sed 's/[^0-9]//g' | sed 's/^0*//'`%${APP_NUM_SERVERS}))

        # Increment by one so we don't end up with an index of 0
        APP_SERVER=`echo ${APP_SERVERS} | cut -d\  -f ${APP_SERVER_IDX}`

        if [ "${APP_PING}" != "false" ]; then
        # Ping the app server to be sure it's up.
            echo "Pinging $APP_SERVER..." 1>&2
            ping -c 1 "${APP_SERVER}" >/dev/null 2>&1
            if [ "$?" != "0" ]; then
                # Drop the bad server out of our list of potential servers
                APP_SERVERS=`echo ${APP_SERVERS} | sed 's/'${APP_SERVER}' *//'`
    echo Selected APP_SERVER: ${APP_SERVER} 1>&2
    echo ${APP_SERVER}



Data preservation and migration



Edubuntu/Specifications/LTSPLoadBalancing (last edited 2010-01-21 17:47:17 by 196-210-177-89-wblv-esr-3)