Client load-balance?

How darkstar manages clients over clusters?

Is there one server that handles all the client connections, some kind of Loginserver? Load-balance clients connection through servers?

It´s quite curious for me because since there is no shard in SGS, somehow you wil need to redistribute clients through server clusters and that means disconnect users and manage them to another location or guess where a new client would be better to go.

The full answer to that is probably one or more conference papers but here is a basic high level description.

When we talk about load balancing, we are talking about the multi-node production servers, not the SGS SDK.

The multi-node production servers use a distributed object store that makes all data available to all nodes. You can think of it as a kind of “clustering” but instead of physical memory being replicated, its as if a large bank of memory is available to all of the processing nodes. In reality, ist more complicated and involves a combination of fast backing store and local caching. Ths distributed object store is really the most "labsy’ thing about the system.

Each user is assigned a node through discovery that they connect to. That node processes all their requests against the shared view of the world contained in the object store. It gets objects as needed from the objects store and returns them when a task commits.

In order to allow more efficient caching, the system is designed so load balancing logic can build affinity groups based on the users’ access patterns and move then to the same node for processing. In this regard it is something like the old hard-wired systems where a zone is located on a system, but it differs in many ways. Key among theses are:

(1) it is not zone based but based on the actual data being accessed.
(2) Affinity groups are not fixed and assigned to fixed machines but come into being as needed by the access patterns of the data and are assigned wherever it makes the most sense according to the current load of the back end.
(3) The developer has to do nothing to create these groups. he or she just writes their code and the system figures out the bast way at any given time to partition the processing available.
(4) If a processing node fails, the group just reforms on one or more other nodes and continues processing without significant interruption of the user experience.
(5) Nodes can be added “on the fly” to add extra capacity and the system balances out the load to include them.

In terms of the actual mechanism used to move clients, part of the client/server protocol is an instruction to the client to move the node it is connected to. This happens inside of the client API and is invisible to the game coder.

I’m afraid to explain it any deeper is probably a few hours of lecture. Ill be covering from the POV of the programmer in a bit more detail at my talk at JavaOne.,

Regarding load-balancing, has there testing been done on how well the system scales? Are there any limitations? Would the system be able to handle a really large userbase; let’s say 1 million connected players?

That is the goal.

We’re load testing as we build. Seeing as how the whole system isn’t done yet, no we haven’t done whole system load tests yet.

Matter of saddling the horse before you can ride it.

are those papers avail online?

No, sorry. At least one isn’t even really written yet. We do intend a system architecture white paper, just again a question of available time.

Thanks for the answers Jeff.

Another question about nodes:

In my country, the datacenter co-location racks are way too overpriced. It´s pretty hard to a small team with no money start a business here.
How much traffic, darkstar nodes will consume? Is it possible to rent dedicated servers at another country and the nodes communicated through internet?
It´s maybe hard to request a private network to get a pool of 3 or 4 servers and even if datacenter has this service, it may be way too high to afford. Scale maybe will be a problem for me.

Hi

The propper back end sounds like it would not be sufficent to use normal hosted servers. Data centers normally use standard ethernet between machines, running at 100 or 1000 mbit, depending on how new they are. Darkstar nodes will be after something faster than that, like infiniband, which starts at 2gbit and goes up to 96gbit (according to wikipedia). I think that would be harder to find in a hosted environment, and certainly won’t be cheap.

On the bright side, see this post by Jeff to see how us small devs will be able to get hold of back ends.

HTH

Endolf

Interesting model. I will wait for more info but i think it´s a way to go with Playground. Sounds too good to be true :slight_smile: