Jump to content

[experimental] mangosd on multiple ports


Guest False.Genesis

Recommended Posts

This patch allows to specify multiple ports to listen on in config, like this:

WorldServerPort = 8079,8085,8099

Commit in my repo: http://github.com/fgenesis/mangos/commit/3132449395514f64b28dfd5eaa5c0e3a36c56cba

Later Fix for GCC: http://github.com/fgenesis/mangos/commit/d5b96ccafdf9c9097a33c82a80d5cf3919e12d7d

No idea who may actually need it, but i had the urge to write this to circumvent some firewall/blocked port issues a few friends had.

This is rather a quick hack, but the code is tested with a few clients on each port, and works.

In case someone is interested in it i may clean this up a bit more -- i'd apprieciate to have a few test results/confirmations if it works as intended.

Note: I am still not quite sure if this is maybe causing some hiden race conditions or other multithread problems, because i am using only one network thread right now.

Feedback on this matter is also appreciated!

Link to comment
Share on other sites

I'm glad for you for having the forthought that windows users don't have iptables but just how does a windows machine then access a network? or use a router? Sorry bud but windows does have iptables and we use them but our tools for them make it easier for the masses not to mess them up...and if you want proof just open up a freshman colledge networking textbook...

Link to comment
Share on other sites

I'm glad for you for having the forthought that windows users don't have iptables but just how does a windows machine then access a network? or use a router? Sorry bud but windows does have iptables and we use them but our tools for them make it easier for the masses not to mess them up...and if you want proof just open up a freshman colledge networking textbook...

Try Wikipedia: http://en.wikipedia.org/wiki/Iptables

iptables is a user space application program that allows a system administrator to configure the tables provided by the Linux kernel firewall (implemented as different Netfilter modules) and the chains and rules it stores.

It's just a front-end to the Linux kernel's firewall. It does not exist on any non-Linux system (Windows, OS X, *BSD, etc)

If you are referring to firewalls, then yes, they exist on other systems. I'm sure FG is aware of this. If you referring to something else then you have no idea what iptables are. You may wish to take a gander at that textbook from time to time.

Link to comment
Share on other sites

Yes Patman I was refering to the Firewall, which is one name it is given for the masses and yes there is a program called iptable for Linux and I do have one on windows as well but the windows program does go a bit deeper than the firewall config, it also handles NAT table, as well as routing(which is what an IP/Table is) yes a Sourceforge Program came out 2 years ago for Windows XP/ Vista and Macintosh called IPTable Config and was created by the same people that made Apatchee. So I guess I still need to look at a book?

Link to comment
Share on other sites

Yes Patman I was refering to the Firewall, which is one name it is given for the masses and yes there is a program called iptable for Linux and I do have one on windows as well but the windows program does go a bit deeper than the firewall config, it also handles NAT table, as well as routing(which is what an IP/Table is) yes a Sourceforge Program came out 2 years ago for Windows XP/ Vista and Macintosh called IPTable Config and was created by the same people that made Apatchee. So I guess I still need to look at a book?

Alright, but none of this was what they were talking about. I thought it would be obvious given freghar's reply and I had really no idea what you were talking about and why you were being a condescending prick.

ON TOPIC!

False.Genesis, I find this patch interesting, and I think it would make a cool extra feature for mangos for those who might need. Would it actually be possible to have a single world server show up as multiple servers in the realmlist and give different content based on which port they are connected to? This could lead to some very interesting custom stuff.

Link to comment
Share on other sites

I'll bow my head now...to you patman, Yes I know your knowledgeable and generally a good person from what I've seen it just gets me upset with the dam Microsoft/Mac/ Linux wars and you wouldn't beleive some of the stuff I've seen off a little statement like that! I my self run a Windows system for mostly fun and games, I do my work on a Mac Pro, and I gave up on learning Linux since all I can't find anyone that can teach me the command line and I can't find the programs or thier like that I use on ether OS...

And BTW condescending prick isn't the right word...it starts with an "A" and ends with HOLE!

Link to comment
Share on other sites

It seems interesting to have this kind of patch.

With the lastest RPS and RFS linux kernel patches (included in mainstream from the last kernel 2.6.35) it can be a very efficient way to handle massive amount of clients.

More information:

- Receive Packet Steering (RPS) http://lwn.net/Articles/328339/

- Receive Flow Steering (RFS) http://lwn.net/Articles/382428/

Link to comment
Share on other sites

Why would this handle clients more efficiently than 1 port ?

Also you'd need some frontend proxy if you want to balance between multiple ports.

Depends on CPU, Virtualization, Muti-port steering (can be handled in core), Bandwith from ISP. Server Companies use this all of the time to serve multiple sites on one server and they do it very effectively, look at Blizzard, Aion, Guildwars, 1 and 1 webhosting, Dig Daddy webhosting and the list goes on. it would be nice for those that can have more than 100 clients at a time or host multiple realms at a time with out all of the extra DB accessing for multiple mangosd.exe's

Link to comment
Share on other sites

Well, I'd suppose that since there would be multiple acceptors, it would be more balanced on them. The rest of the server would still be doing the same amount of work.

You could set up a rudimentary load-balancing system by just having the server multiple times in the realmlist, once for each port. Then the players could choose which port to use, depending on if the population thing says High, Low, Recommended, etc.

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use