Question about multiple sfs2x instance

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

longnt
Posts: 19
Joined: 16 Oct 2020, 02:02

Question about multiple sfs2x instance

Postby longnt » 01 Oct 2021, 15:08

Hi,
I'm having multiple online games using smartfox as there online foundation, each game have a unique zone and use the same UDP, TCP, Host IP config (Current setup)
Now I want to run another smartfox instance on my machine that have difference UDP, TCP port (same host IP)
According to the this article
I've setup an environment that have multiple sfs2x instance on my machine and I have some question
I've update all my games that point to a server that will return the UDP and TCP port they can connect to
But I notice that at the client the DataConfig instance have HTTP and HTTPS Port so my questions are:

1. Does that HTTP and HTTPS port matter if I just leave them as default value (Since currently all my game just config Host IP, UDP and TCP port)?
2. If my client have a HTTP request to smartfox server then those port need to change right?
3. Are there any value that I need to check for having this environment configuration (Multiple sfs instance on 1 machine)?
4. What are restriction that will need to worry for having multiple sfs instance on 1 machine?

Thanks!
User avatar
Lapo
Site Admin
Posts: 23025
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Question about multiple sfs2x instance

Postby Lapo » 02 Oct 2021, 10:05

Hi,
the article you have linked is quite old and refers to SFS2X versions prior to 2.14. If you're using 2.14 or higher you should refer to this more recent tutorial --> https://smartfoxserver.com/blog/running ... t-edition/

1. Does that HTTP and HTTPS port matter if I just leave them as default value (Since currently all my game just config Host IP, UDP and TCP port)?

No, if the HTTP/HTTPS are never used by the client you don't need to specify these values in the ConfigData and therefore you can leave the default values.
Keep in mind that the HTTP port can be used by the API if the client fails to connect via TCP socket and you have activated the BlueBox as a backup option for connection.

2. If my client have a HTTP request to smartfox server then those port need to change right?

Yes, they need to match the actual port values configured on the server side.

3. Are there any value that I need to check for having this environment configuration (Multiple sfs instance on 1 machine)?

I am not sure what you mean by that.
In order to run multiple SFS2X instances on the same machine you will need to configure the ports of each server so that they don't collide. The article I've linked at the top of my reply should help you with the setup.

4. What are restriction that will need to worry for having multiple sfs instance on 1 machine?

There aren't particular restrictions, besides avoiding port collisions.

Hope it helps
Lapo
--
gotoAndPlay()
...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 64 guests