seDirector / App

seDirector is a game server management application.

Home Page:https://sedirector.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Same server folder to launch multi server srcds.exe program (sharing game server folders)

fbef0102 opened this issue · comments

Hello, I like this app.
But recently I would like to use same Left 4 Dead 2 Dedicated folder and launch about 10 left 4 dead 2 servers
image

I know I can create 10 different folders to do that, but it is very inefficiency, and occupy much disk space.
Is there any option?

Hey there, I'm glad you brought this up. Others have asked a similar question before but it's never been officially addressed.

It makes complete sense that you'd want to share the same directory for multiple servers, because that simplifies administration, especially since most admin use the same plug-ins, similar maps, similar sounds, etc. It also, of course, can save disk space.

The maps and sounds and resources are probably okay to share the same folder, but the big problems arise with things like:

  • Log files
  • Plugins that use the filesystem
  • Plugins that use a database (like MySQL)
  • Configuration files that may change during the game
  • Other server specific data

If you have two servers using the same directory, the first game server may accidentally overwrite data written by the second game server, and vice versa. They would essentially compete for the last write, and the game servers could crash. This is because many programs write data by opening a file handle on the file, and after it's done writing, closing that file hanfle. If two separate programs both have file handles on the file, it can create issues. Think of two people writing to the same Microsoft Word document. Usually Word will make it read-only to one of those people.

To ensure the stability of the game server, it's recommended to use separate directories for each game server.

There are two options we've been exploring as workarounds:

  • Symbolic links
    • This creates a directory junction. So you'd have a folder and then a symbolic link to that folder, almost link a virtual folder.
    • Example: C:\Steam\TF2#2\maps isn't a real folder, but looks & acts like a real folder, even though its contents are actually located in C:\Steam\TF2#1\maps
    • This means updating anything in either folder would update in both. They aren't two separate folders, but rather one is logically pointed to the other. Like saying "when you look in this folder, actually look in this other folder"
    • You can actually do this yourself with the mklink command in cmd, Google for command line arguments and use
    • This isn't the safest approach because files can still be changed and it could affect both servers which could lead to them crashing or having unexpected results
    • May or may not work with the current version of seDirector, it is not officially supported at this time.
    • If you do decide to do this, I'd strongly advise against doing a symbolic link on the whole server folder, but rather just the folders you absolutely need to sync that you know won't conflict, like maybe maps or sounds
  • File synchronization
    • Synchronization of files/folders between separate game servers
    • This is the preferred workaround because it keeps the data separate and upon a conflict could avoid overwriting data depending on the way you sync the data
    • We are strongly considering adding this as a feature of seDirector since it would seemingly provide an easy, safe way to have the same data on multiple servers.
    • Ideally the sync would happen in real-time and upon a conflict, a notification message could be sent to you.

Symbolic links seem like a better choice at first because you'd save disk space, but I'm hesitant to proceed with that because multiple writes on a file/folder could easily occur, whereas file sync would wait until the file is done writing before it synced it.

If you are using Windows Server, you can install the File and Storage Services role and enable Disk Deduplication. If Windows sees the same file in two spots, it'll only take up the space of one of the files.

Hope this helps! Let us know if you have any questions. I will probably add this as a feature request on the roadmap.

Thanks for your replay and sharing other options.

I will probably add this as a feature request on the roadmap.

Nice, I will keep using seDirector

Reopening this to track status changes. Added to the roadmap as officially planned.

Would also like to see the ability to save space on HTTP Fast Download sync destinations as well.