LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: UDP traffic

To: "Georg P. Israel" <georg@xxxxxxxxxxx>
Subject: Re: UDP traffic
Cc: Joseph Mack <mack.joseph@xxxxxxxxxxxxxxx>, lvs-users@xxxxxxxxxxxxxxxxxxxxxx
From: Joseph Mack <mack.joseph@xxxxxxx>
Date: Fri, 16 Mar 2001 09:29:59 -0500
"Georg P. Israel" wrote:
> >
> > don't understand this
> 
> Now that I'm reading it again, ...
> I have to admit I also don't understand it.

:-)

> Here a better description.
> 
> I have several customers that are running Quake and HalfLife Servers.
> Just for the case you don't know about, these are popular computer games.

I expected people would want to LVS these sort of games ages ago, 
but no-one has ever come up on this list talking about it. People 
just want to put LVS in front of squids and web servers. 

> If I'm running serveral such servers on the same machine, then I'll have to
> assign them onto differen port numbers typically 27015, 27016, ...
> 
> Now my problem,
> These Server a very CPU cycle intensive, and I like to be able to reasign
> such a Server to some other machine without having to tell the customer.
> The customer should only see one virtual machine with one IP address
> and a range of UDP port under which the server are running.
> 
> >> One Server generates applox. 0.5MBit/s traffic.

so it's CPU intensive but not network intensive. What sort of bandwidth
would you need to keep the largest expected number of players happy?

> >>
> >> Are there any encouraging or discouraging comments toward this
> >> non TCP based stuff??
> >
> > UDP works fine with LVS (eg DNS and NTP).
> 
> Seems you believe this sort of stuff is working?

DNS was first done by Ted Pavlic and I tested his setup and wrote
it into the HOWTO. Someone else wrote that he had NTP working
on an LVS. The UDP load balancing code has been in LVS for most
of its existance, so I would hope it works fine. Admittedly we haven't
seen people use UDP much, so I won't be surprised if there are wrinkles.

I'm not sure why you are talking about UDP here. Are these games
UDP based? (If so, how does the server maintain state?)

Does each game connection only require one port?

You haven't asked me a question (beyond if I think it works),
so I'll assume you'd like some hints on setting this up.

The constraints on your situation are that you have n physical 
servers (let's say 10 for discussion) and you expect to serve 
m players (where m>>10, say 100 ?). 

You then need at least m real-servers. I haven't thought about this
a lot, but I assume then you'd set up each physical server with
10 ports listening for connects from players, giving you 100 real-servers.

Since you have different ports involved here and the LVS is not network
limited, you could use VS-NAT on the director to rewrite the ports
to one port, the standard quake port (if there is such a thing).

Then you have to arrange for the players to be assigned to each physical
box in turn (rather than have the first 10 players to be assigned to 
the various ports on physical box 1 say). If you setup VS-NAT with
ipvsadm like this


(if quake is udp, change -t to -u below)
ipvsadm -A -t VIP:quake -s rr
ipvsadm -a -t VIP:quake -r server1:port1 -m -w 1
.
.
ipvsadm -a -t VIP:quake -r server10:port1 -m -w 1
ipvsadm -a -t VIP:quake -r server1:port2 -m -w 1
.
.
ipvsadm -a -t VIP:quake -r server10:port2 -m -w 1

etc

then I expect that new connections will cycle down this list
making connections through all the physical servers on port1
first, then all the physical servers on port2 etc, keeping the
load spread amongst the physical servers.

Joe
-- 
Joseph Mack PhD, Senior Systems Engineer, Lockheed Martin
contractor to the National Environmental Supercomputer Center, 
mailto:mack.joseph@xxxxxxx ph# 919-541-0007, RTP, NC, USA


<Prev in Thread] Current Thread [Next in Thread>