PDA

View Full Version : Optimal way to link two servers?


Ted S
Wed 6th Oct '04, 11:15pm
It seems like I am at the limit of my current server but before I add another machine to the network I would like some advice as to the best way to accomplish this. I imagine a direct crossover cable would be best but is there anything else I should be aware of or request from my colo provider before having this setup?

Thanks.

eva2000
Wed 6th Oct '04, 11:27pm
you mean add 1 server to current server for web + db server configuration ? or you mean you plan to add more than 1 server later to existing server ? i.e. 3 servers ?

Erwin
Thu 7th Oct '04, 1:14am
Crossover cable on separate nic, probably eth1 if eth0 is for internet, with separate IPs you can use - remember to use the IPs given for the separate nic, otherwise you're wasting bandwidth by going via the internet. :)

Ted S
Thu 7th Oct '04, 1:19am
George,
I will be going from 1 box for web & db to 1 box for web (current box) and 1 box for db (new box).

Erwin,
Would it be better to map the server so the db server is private and accessible only through the other (web box) or is that simply a security setting and not something related to preformance?

splooge
Sat 9th Oct '04, 1:48pm
Well the most "optimal" way -- as far as networking and traffic is concerned -- would be to have 2 NICs in each server. One nic that connects each machine to the 'net (the colo's switch), the other nics used to connect each other directly with a crossover cable. Doing it this way there's no need to setup any type of NAT for the db server behind the web server because it will have it's own access to the 'net, and since all networks will be directly connected there's no need to mess with any route statements. It's as simple as throwing the new cards in and assigning them an IP address.

Erwin
Mon 11th Oct '04, 10:06am
George,
I will be going from 1 box for web & db to 1 box for web (current box) and 1 box for db (new box).

Erwin,
Would it be better to map the server so the db server is private and accessible only through the other (web box) or is that simply a security setting and not something related to preformance?
The database server can have a firewall running which blocks all ports, and only allows mysql traffic via 3306 from the webserver using the 2nd internal nic. Of course, you'd want a port open for SSH as well - or you can also go through your webserver for that too - depends on how locked down you want it to be. :) It's security, and doesn't make any difference to performance - just make sure you use the correct nic/ IP. :)

alexi
Sun 24th Oct '04, 12:42am
somebody else was running 2 servers connected with 1 nic each. They experienced a huge performance issue going to two nics.

Erwin
Sun 24th Oct '04, 8:26pm
Please elaborate on their setups. Running 2 nics, one internal, the other external, should improve performance since you are separating data streams.

alexi
Sun 24th Oct '04, 8:34pm
Usually you just set up the nic's with IP adresses on totally different subnets. If you are using a crossover cable or connecting via a switch you can use private IP's for the connection between the 2 machines.

For example if your front end has a public IP address of 206.40.138.10 and your database server has a public IP of 206.40.138.11 you could set the internal NIC's to 192.168.1.10 for the front end server and 192.168.1.11 for the database server. In config.php on the front end server you set 192.168.1.10 for the database. Make sure to give appropriate permissions to the database since it will be coming from a different IP. The public IP on the database server ends up only being used for control and FTP etc.
If you are at a hosting service they will assign both sets of IP's but it will work similarly.

Erwin
Mon 25th Oct '04, 1:52am
You're not telling me anything new there - that's how you would do it normally.

You posted:

somebody else was running 2 servers connected with 1 nic each. They experienced a huge performance issue going to two nics.

My questions was how would having 2 nics cause a huge performance issue? It should be performance improvement, not issue.

eva2000
Mon 25th Oct '04, 6:23am
somebody else was running 2 servers connected with 1 nic each. They experienced a huge performance issue going to two nics.
i think Alex you got it mixed up, that somebody had issues cause he was running 1 nic on web server to server web traffic as well as communicate with db server, once he used 2 nics in web server - performance improved and Alex you're the one who picked up on that too :)

alexi
Mon 25th Oct '04, 8:13am
OHHH DUH!!!!!!!!!!
I'm sorry Eva is right I totally mis-phrased the original answer!