Setting Up a Server

Added by Dave King over 2 years ago

I am running Windows 10 on my desktop so I will probably
run a test version on it.

But I also run a dedicated server with ubuntu 20.04.
What sort of specs are necessary to run one world with say 1000 concurrent users?
Would that be reasonable for a single server?

What would I need to allow users to signup and then enter my one world?
Would users always have to select an avatar or can that be remembered
using a normal login MySQL db ?

Dave King

Replies (3)

RE: Setting Up a Server - Added by Josip Almasi over 2 years ago

Hi Dave,

Single server should be able to do it, but really, that depends what you and your users do. Realistically, people don't move while typing messages into chat.
But suppose they all see each other all the time, then every single event (e.g. movement) has to be delivered to 1000 users.
Suppose they all move all the time. By default, a client will send up to 5 events per second, that's 5x1000x1000 events per second. That's all json, suppose that one network event is 100 bytes, and you get to 500 megabytes per second.
One server just can't handle this, even if it's got 1Gb ethernet card. And no user could handle it - if we count on 100Mbps DSL modem typical nowadays, that's up to 10MBps.
And that's why we don't have 1000 concurrent players in any MMORPG :)
But if they don't see each other all the time, or if they don't move all the time, one server should be able to handle it.
There are vrspace.scene.range and vrspace.scene.size parameters that allow to fine tune how far and how much other users a user can 'see'.
Reality check, highest number of concurrent users I know of is Guild Wars 2, 75 vs 75 vs 75.
On the other hand, VR gear packs three sensors - two arms and head - that emit both rotation and position 25 times per second. Say 150 events, 100 bytes each, 25 times per second so a user emits like 375KB every second. Round it up to 500 for good measure - we need to leave some bandwidth for other things like content download - 10MBps divided by 500KB gets us up to 20 concurrent VR users.
Reality check - care to guess max players in VR Chat? ;) Quick googling - 16.

That said, the server hasn't been stress tested yet.

To allow users to sign up, you need to set up your own sign up page, take avatar-selection html and js for example. It already implements Oauth2 (login button) and users already can login with their google, facebook and github credential - once you have registered your 'app' (server) with each them and configured your secrets in your vrspace You can also implement some server-side authentication extensions, see
All properties of authenticated users get stored forever into Neo4J database embedded with vrspace server, including avatar. Owned objects also get stored, so authenticated users can build worlds together, objects won't disappear once they disconnect.
Typically you'd add some cookie to user's browser to store their ID at least. I have gone to great lengths to avoid it yet make it work without it, so that I can have truly anonymous demo running at, but that's really a special case.

RE: Setting Up a Server - Added by Dave King over 2 years ago

Thanks very much for your detailed reply, really appreciate it.

So my 1000 concurrent users was just idea to get some feedback and an idea of what is feasible or normal.

The server I have available is nothing special ( my home pc is more powerful )

Server Specs :
Intel Xeon quad cure E3 1270v1 CPU
16GB of RAM
Running ubuntu 20.04

I like the idea of allowing people to authenticate with FB, Google and the like.
But some people like to sign on with just email and password.

I look forward to getting it running.
Maybe start tomorrow.

I am wondering how I could control the building of stuff by visitors, if everyone
just builds anything anywhere, some idiots could build on top of some else's house, or
right in front of it or other unhelpful awful things !!!

RE: Setting Up a Server - Added by Josip Almasi over 2 years ago

Well I'm one of email/password people :)
But that's more work. Not just keeping login/password in the database, but also making it and keeping it secure. More users, bigger target on your back then, you may get hacked just because you have a lot of email addresses stored. People tend to forget passwords, you must have password reset mechanisms over mail etc.
And none of it is by any means specific to a VR server, and VR server certainly isn't the only thing you're about to run. Look here, we run redmine, and register in redmine.
So authentication is simply not responsibility of a VR server. Authentication plugins, that's mandatory.

Spaces have to be moderated one way or another.
I like to think of it like wikipedia :) Community moderated.