Add SRV Record support
Moderator: ickputzdirwech
-
- Manual Inserter
- Posts: 1
- Joined: Wed Nov 13, 2019 2:37 pm
- Contact:
Re: Add SRV Record support
Are there any news on this Topic? Any Dev on this?
Re: Add SRV Record support
+1 SRV support would be great to have so no need to mess manually with ports. And easier to host multiple servers on the same machine with same IP, but different ports, yet still use different DNS names for them. Ports would be discovered via SRV.
-
- Manual Inserter
- Posts: 1
- Joined: Thu Jan 30, 2020 5:31 pm
- Contact:
Re: Add SRV Record support
+1, I host for a let's say...easily confused...group of friends. This would streamline things
Re: Add SRV Record support
I’m not very deep into that, but wouldn’t this be possible with Docker? Create Docker Image for Factorio and let it run twice. Networking the containers should then be simple.
Just quick googling:
https://hub.docker.com/r/dtandersen/factorio/
https://hub.docker.com/r/goofball222/factorio/
Just quick googling:
https://hub.docker.com/r/dtandersen/factorio/
https://hub.docker.com/r/goofball222/factorio/
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
-
- Fast Inserter
- Posts: 207
- Joined: Thu Jun 04, 2015 12:20 am
- Contact:
Re: Add SRV Record support
Issue is you have one public IP with multiple Factorio instances. You need the ability to route based on hostname to one of each container. Be that with an ingress server (like HTTP does with the Host header) or with an SRV record to tell the Factorio client which port to connect over.ssilk wrote: ↑Thu Jan 30, 2020 8:41 pmI’m not very deep into that, but wouldn’t this be possible with Docker? Create Docker Image for Factorio and let it run twice. Networking the containers should then be simple.
Just quick googling:
https://hub.docker.com/r/dtandersen/factorio/
https://hub.docker.com/r/goofball222/factorio/
Re: Add SRV Record support
The Docker container does that for you. The image internally connects to the same ip in both images.
Of course it’s not so simple as if there is a SRV-record, never did that, but I’m sure its possible...
Of course it’s not so simple as if there is a SRV-record, never did that, but I’m sure its possible...
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Re: Add SRV Record support
The docker container can put the two instances on different ports, but it can't make them both share the same ip and port.
Last edited by Gellis12 on Fri Jan 31, 2020 1:27 am, edited 1 time in total.
-
- Fast Inserter
- Posts: 207
- Joined: Thu Jun 04, 2015 12:20 am
- Contact:
Re: Add SRV Record support
If what you're suggesting works, I would be very happy.
Would you mind posting a working docker-compose.yml that demonstrates your solution?
Re: Add SRV Record support
Sorry, this evening iPad only.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
-
- Fast Inserter
- Posts: 207
- Joined: Thu Jun 04, 2015 12:20 am
- Contact:
Re: Add SRV Record support
You should ask someone who is more informed than me. Eventually ask here for example https://www.reddit.com/r/docker/
On the other hand the best way to do it is learning it yourself.
I would look for a good example. This looks good: https://hub.docker.com/r/factoriotools/factorio/
Actual 0.18-release: Check.
And from here I would try to understand it and extend it for my needs. Eventually I would ask the author - mybe he/she is interested to include that.
On the other hand the best way to do it is learning it yourself.
I would look for a good example. This looks good: https://hub.docker.com/r/factoriotools/factorio/
Actual 0.18-release: Check.
And from here I would try to understand it and extend it for my needs. Eventually I would ask the author - mybe he/she is interested to include that.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
-
- Fast Inserter
- Posts: 207
- Joined: Thu Jun 04, 2015 12:20 am
- Contact:
Re: Add SRV Record support
Ok, well I have very extensive experience with Docker and I can tell you with high degree certainty that Docker does not solve the problem that we need SRV records to address. I asked since you said you were "sure its possible"ssilk wrote: ↑Mon Feb 03, 2020 8:46 pmYou should ask someone who is more informed than me. Eventually ask here for example https://www.reddit.com/r/docker/
On the other hand the best way to do it is learning it yourself.
I would look for a good example. This looks good: https://hub.docker.com/r/factoriotools/factorio/
Actual 0.18-release: Check.
And from here I would try to understand it and extend it for my needs. Eventually I would ask the author - mybe he/she is interested to include that.
Re: Add SRV Record support
Hm so I "took my mouth too full", how we say in German. Sorry for that, I normally use that only and do not configure it. But I know, that we use somewhere two MySQL docker containers (one for read, the other for readwrite). Both run on one host. And that looked for me too similar, so that I thought this must work also for a game. Maybe it's Kubernetes, that does this magic?
I really don't know and as you ask me I think I should know, how this works, so I will ask.
I really don't know and as you ask me I think I should know, how this works, so I will ask.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Re: Add SRV Record support
+1 someone came to our discord asking for this and it is a good idea if it's not too hard to do. We could have for example bb.getcomfy.eu for biter battles and so on.
✧COMFY FACTORIO✧ - Home of Biter Battles, Fish Defense, Chronotrain.. And More!
Re: Add SRV Record support
+1 to srv records, if not to much of an effort with 1.0 coming up.
Re: Add SRV Record support
+1 Would be really helpful for having Server Addresses People can remember
Re: Add SRV Record support
I still think this is simple port forwarding inside of a kubernetes cluster or similar or Docker can do this meanwhile itself. Nothing which needs to be part of Factorio.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Re: Add SRV Record support
I don't see why anyone would learn and run an entire container cluster for this simple feature. But maybe there is another way around it. The second answer to this stackoverlow post suggests nginx as a means to route traffic entering on a single port to different ports based on which subdomain they can from. It does mean the nginx process has to touch every packet going to every server instance, so there can be a bottleneck & extra latency. SRV records ensure the performance is the same as directly specifying IP:port.
My mods: Multiple Unit Train Control, Smart Artillery Wagons
Maintainer of Vehicle Wagon 2, Cargo Ships, Honk
Maintainer of Vehicle Wagon 2, Cargo Ships, Honk
Re: Add SRV Record support
To expand on what I said earlier in the thread, these are both solutions for running multiple servers on the same host, listening on different ports (which is easy to do without using docker, I might add).
These tools will not allow users to connect to factorio1.example.com and factorio2.example.com; the user will still need to specify port numbers for at least one of the factorio servers, since multiple processes on the same host cannot listen on the same port.
What an SRV record would accomplish, is automatically telling the client which port to connect to based on the requested subdomain (ie, factorio1.example.com would point to 1.2.3.4:101 and factorio2.example.com would point to 1.2.3.4:102)
Furthermore, since SRV records are at the DNS level, there would be no additional bandwidth bottleneck or added latency from using a proxy server to attempt to accomplish this.
Re: Add SRV Record support
@robot256: have you seen the post date? 2017. It might be - I’m not an expert - that there where changes meanwhile. Just my usual stackoverflow habits.
I have a question at this point: when you run two Factorio servers at one host, who or what decides which will receive which packet when the incoming packet is for the same target port? Is that be done by the operating system? I mean: there must be something “above” the two Factorio servers, which does the routing depending on the target IP, otherwise - AFAIK - the OS does not distinct between the incoming IP, it can route internally only to the port of the listening server, or not?
Ok, understood, thank you. Well, ok, that makes kind of sense now. My mistake was, that I’ve always seen this from the internal routing sight, I mixed some things up.Gellis12 wrote: ↑Fri Dec 04, 2020 5:55 amTo expand on what I said earlier in the thread, these are both solutions for running multiple servers on the same host, listening on different ports (which is easy to do without using docker, I might add).
These tools will not allow users to connect to factorio1.example.com and factorio2.example.com; the user will still need to specify port numbers for at least one of the factorio servers, since multiple processes on the same host cannot listen on the same port.
What an SRV record would accomplish, is automatically telling the client which port to connect to based on the requested subdomain (ie, factorio1.example.com would point to 1.2.3.4:101 and factorio2.example.com would point to 1.2.3.4:102)
Furthermore, since SRV records are at the DNS level, there would be no additional bandwidth bottleneck or added latency from using a proxy server to attempt to accomplish this.
I have a question at this point: when you run two Factorio servers at one host, who or what decides which will receive which packet when the incoming packet is for the same target port? Is that be done by the operating system? I mean: there must be something “above” the two Factorio servers, which does the routing depending on the target IP, otherwise - AFAIK - the OS does not distinct between the incoming IP, it can route internally only to the port of the listening server, or not?
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...