Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


A DNS + Round Robin with port question
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

A DNS + Round Robin with port question

jvnadrjvnadr Member
edited February 2015 in Help

Hello. I am not in-deep familiar with DNS servers, just know the basics for basic installations.

I want to create a round robin setup to randomly redirect requests for a domain to several different servers. I do not want to redirect just to ip (1.2.3.4) but I want to use specific different port to each ip. E.g.:

www.example.com redirects to this round robin setup:

1.2.3.4:85

111.123.34.22:5000

3.42.144.26:6002

(of course ips and ports are hypothetical :-) )

I am usually use Cloudflare or Afraid.org to handle my dns, but neither can use ports in their A records.

Do gyus have any suggestion on any free or cheap service lie cloudflare that could handle something like that or, even better, a suggestion about my own setup on my own server/vps?

Thanks!

Comments

  • MuZoMuZo Member
    edited February 2015

    A / AAAA records just resolve a name to an IP, you can't include a port in it.

    SRV record type let you specify a port (along with other interesting things for load/failover) but the client need to look for that record and browsers don't look for SRV records when you open a webpage, they ask to resolve the IP behind the name asking the A/AAAA record and open the connection on port 80 if you don't specify a custom port.

    Thanked by 2Mark_R aglodek
  • aglodekaglodek Member
    edited February 2015

    Interesting idea, though. Too bad, really. Would be a great functionality, say, no A/AAAA record provided, then check SRV records. Or better yet, allow for use of ports in A/AAAA records as @jvnadr suggested ;)

  • Pretty sure ports are not allowed in A/AAAA records...

    Sadly no modern browsers seem to support SRV records as MuZo said as this would be useful for NAT style setups ;)

    If its for personal use I would suggest making a page so browsers can load on port 80 that links to the different locations/ports you want.

  • @jvnadr said:
    Hello. I am not in-deep familiar with DNS servers, just know the basics for basic installations.

    I want to create a round robin setup to randomly redirect requests for a domain to several different servers. I do not want to redirect just to ip (1.2.3.4) but I want to use specific different port to each ip. E.g.:

    www.example.com redirects to this round robin setup:

    1.2.3.4:85

    111.123.34.22:5000

    3.42.144.26:6002

    (of course ips and ports are hypothetical :-) )

    I am usually use Cloudflare or Afraid.org to handle my dns, but neither can use ports in their A records.

    Do gyus have any suggestion on any free or cheap service lie cloudflare that could handle something like that or, even better, a suggestion about my own setup on my own server/vps?

    Thanks!

    As most people have mentioned already, you can't use ports with your A records unfortunately. This setup would be great, but not possible with current SRV support levels.

  • century1stopcentury1stop Member
    edited February 2015

    wonder if this is possible

    sub-domain A or AAAA records with different IPs

    then use a script or redirect at sub-domain level or iptables to different ports?

  • jvnadrjvnadr Member
    edited February 2015

    century1stop said: wonder if this is possible

    sub-domain A or AAAA records with different IPs
    then use a script or redirect at sub-domain level or iptables to different ports?

    If it is just a html page on a normal hosting platform (e.g. apache), then, there should be a lot of tricks as solution. But, in my case that I want to use round robin for other protocols (mostly rtmp://), then, redirect in browser's level cannot be used...

    For now, I use a html redirect page and embed the html page to any website that wants to show my streams. Setup is html redirection page > random html pages with jw player.

    The jwplayer html pages have different ips with ports to handle rtmp stream. But with this solution, I have to give to third-party websites the html page for embeding instead of a flash player code or, even better, direct rtmp stream address...

    (The whole issue is because of use NAT ipv4 vps's and not normal ipv4 box with standart (same) port to all of load balancing servers).

Sign In or Register to comment.