[FreeNX-kNX] nxserver loadbalance.

Dimitar Paskov pascoff at nola7.com
Mon Apr 16 09:30:22 UTC 2007


> Hi Dimitar,
>
> On 4/13/07, Dimitar Paskov <pascoff at nola7.com> wrote:
> > > Dimitar Paskov wrote:
>
> > So the thin client boots from network and runs X with nxclient as only
> > application with ion2 window manager (the only one I found that can be
> > configured to display application in full screen).
>
> ok. I'm using ltsp thinclients running nxclient as a local-app.
> You have all the nxclients and nxproxies of your users running on one
> box ¿right? I'll have a look at ion2. thanks. Do you think installing
> an sftp client on the ion2 desktop as a way to upload and download
> between nx desktop and local devices?

Sorry, I didn't understand completely but, again nxclient/nxproxy is running 
on every thin client independently of each other but the image of the thin 
client environment is on a nfs share and is mounted on the thin client read 
only.

> > Load balancing is done by 2 scripts. One is running on every server
> > through cron every minute and checks how many users are logged in by
> > "watching" how many nxagents are running.
>
> I've seen an auto_start option in node.conf. Could you make the
> nxserver notify your monitoring server instead of running a cron?

Yes, that is possible but auto_start is executed only on login session but not 
on logout so I can only know the logins but not the logouts of users. And if 
a session crashes for some reason (server failure) there is no way to know 
that a session ends. So we decided to monitor sessions externally via cron.

> > The other
> > script is the one that nxclient executes which checks in this databases
> > which server has less resources.
> > Next nxclient connects to the less loaded server. Every server has
> > nxserver, nxnode and nxagent installed. Nxserver writes the session
> > information to the mysql database and connects to nxnode/nxagent on
> > localhost.
>
> you have achieved session persistence in an office (or work)
> environment, is that right? The staff in our company have never had
> persistent sessions. They don't even know if that sort of thing is
> possible or not. So, they aren't going to miss it if we don't deploy
> it.
> What do you think about persistant sessions for your user profile?

That is one of the coolest things about nx technology. We use it very often in 
our company in different situations. For example if we have power failure in 
our office building (which happens sometimes) all thin clients switch off but 
the servers keep running on UPS. When power comes back, thin clients boot and 
when nxclient connects it resumes sessions wright from the spot it was 
interrupted when the power went down. Another example is when a user needs to 
switch its working place for a while he/she suspend session and resumes it on 
another thin client without any loss of information and work progress. For me 
it is very useful feature because I do alot of tests, reboots, crashes and 
things like that and after all I can resume my session even after day or two.

>
> > We can connect as
> > many servers as we need to the cluster and they will be instantly
> > available. One interesting moment is that our servers are "thin" servers
> > (like the clients), they do NOT have hard drives but mount read only
> > their root / (/home is rw on another nfs file server) from a master nfs
> > server which serves the images of the clients and servers.
>
> I've been doing that sort of thing too. I recently managed to boot Xen
> on nfs and then the virtual machines ontop. no hard drive. So I was
> thinking about running the nxserver and desktop as a virtual machine
> but maybe that's not very sensible.

This is another solution but you need more powerful server to run virtual 
machines on. We have plans to use virtual environment for every user/session 
ie. to start every session in its own virtual jail. But thats not in the 
priority list for now.

>
> > This master server has its
> > replicator/backup server made with heartbeat and drbd (which holds the
> > images) and if a disaster happens with the master, the backap becomes
> > master and takes all the resources from it. mysql and tftp (which is used
> > for network booting) are running on the master as well as nfs.
>
> How is your network? Is it divided up into subnets and that sort of thing?

Yes, we have two networks. One is 100Mb between thin clients and thin servers. 
The other is 1Gb between thin servers and file/master server. This is needed 
because on a heavy application load or a very big file open the network is 
very loaded with traffic and it affects thin clients because they are very 
network dependant.

> > Of course there are some problems left unresolved but as a whole it is a
> > very good solution to our company. For now it works only in local area
> > network but we plan to make it work over internet.
>
> tip my hat.

We have offices in a lot of locations (different than the central office) that 
have their own servers and stuff and if we take them out and put only thin 
clients that connects directly to our central office through internet that 
will be the ultimate solution for us ;)

I forgot to write about local device access and multimedia. Devices like 
floppy, cd/dvdrom and usb sticks are working very well with thin clients due 
to the good work of the people at the LTSP project. There is a little problem 
with multimedia thou. It is possible to listen to music (I do it all the 
time) but you need a good server <-> client connection. For video it is 
possible too, you can watch small sized videos with low resolution but if you 
want to watch a full screen movie with good resolution there comes the 
problem. We thought about this and there may be solutions to this like xmms2, 
mplayer, vlc, etc. but we have no time to research and make it work for now.

>
> > I hope that you understand my writings :) If any questions arise, don't
> > hesitate to ask!
>
> good writings.

I'm glad. thanks :)




More information about the FreeNX-kNX mailing list