sharing IP numbers or sub-server?

sorry but i am not quite sure what i am asking here so please bear with me.

i have a resource-intensive Java application running on the server that is licensed via the domain name. if i wanted to run this monster on its own server, would it be possible to either run two servers with the same domain name somehow and dedicate a specific port to the Java server?

in other words, say i have the domain name iLoveInterserver.com - could i run this domain name on two servers, but have my java-server answer port #1935 only ?

or should i be considering a sub-server (which i am not even sure what that is)
 

Quags

Administrator
Staff member
You can do round robin in dns

Domain points to two ips, two separate servers. If there is some shared database, like a single mysql server, I'd expect no problem going this route.
 

Quags

Administrator
Staff member
Correct at dns. And its really easy, just have two A records to different ips.

Like

interserver.net in A 4.2.2.2
interserver.net in A 4.2.2.3
 
thanks john -

just so i am on the right track here, for example say i have three servers (quags worst nightmare come true)

IP## _ _ _ _ process running

4.2.2.1 ----> apache (ports 80, 280, 8080)
4.2.2.2 ----> java/Red5 ONLY (ports 1935, 5080) (no apache running)
4.2.2.3 ----> mysql server ONLY (port 3306) (no apache running)

and then i have the following domain "A" records
interserver.net in A 4.2.2.1
interserver.net in A 4.2.2.2
interserver.net in A 4.2.2.3

it sounds if you are saying that a request to Red5 (port 1935) will try 4.2.2.1 and failing that (as it should), it will then try 4.2.2.2 ?

and one last question - if mysql-server is running on both 4.2.2.1 and 4.2.2.3, is there a way to force a mysql query to go to one particular server vs. another? maybe use different port numbers, like an alternative MySQL port ?
 

Quags

Administrator
Staff member
Round robin has no checking in it. Under your scenario you will get to one of the three ips (if they are up or not) regardless if something is running on the port.

So this works if you have the same services on all three servers.

With out layout:

4.2.2.1 ----> apache (ports 80, 280, 8080)
4.2.2.2 ----> java/Red5 ONLY (ports 1935, 5080) (no apache running)
4.2.2.3 ----> mysql server ONLY (port 3306) (no apache running)

I see no reason for load balancing because all three services run different programs.
 
if i wanted to have a different service on each server, how could i direct IP traffic based on the port number? if round-robin is for load balancing of the same service, it does not sound like this is the answer.

i would want port 1935 traffic to go to one server, and everything else to go to another.
 

Quags

Administrator
Staff member
You could use something like balance: http://www.inlab.de/balance.html to forward tcp connections from one server to another server.

This would mean the server running balance needs to "always be up" for things to work.

Balance can be run simply with

balance 8080 $ip:80

Forward port 8080 to remote $ip port 80
 
Top