Jump to content

Help me set up my system.


Recommended Posts

Folks,

I am running ip.board (and a dozen or so wordpress sites) off of my dedicated server in my business. I have a static IP. The current server is an OS X server (10.6 flavor).

I have put together an Ubuntu server box, with just MYSQL installed. This second box is currently on a router on my home setup (Non-static ip) just for setting up purposes.

Can anyone give me a general overview of getting this Linux box to act as a mysql server, accessed by my IP.board (and wordpress installations). I don't know if it is as simple as setting up a router on the static IP, or if there is more involved. Any pointers to how-tos or links explaining would be most helpful.

Basically what I want to do is have my mac pro as the php/apache and the Ubuntu box as the MYSQL server, my hopes is that it would speed up the overall serving of pages.

Both the Mac pro and Ubuntu boxs have 4 terabytes of SSD space, and 32gbs of ram, so resources ought to be maxed out.

Thanks in advance!

Link to comment
Share on other sites

  • Put the public static IP of your mysql server in the IPB settings (found in configure).
  • Ensure that your mysql can connect to the internet. Typically firewall blocks this, if you have any as it's pretty stupid to leave mysql accessible to public. :D
  • Ensure that your mysql permissions allow connection from outside and not just local/intranet. It's typically not setup because... ^
  • Brace yourself for the slowest site loading of your life.
  • Make sure to install a smart firewall that'll block someone permanently after few failed attempts at mysql. Otherwise, prepare to be hacked. :D
Link to comment
Share on other sites

My point of concern is the 4th item on the list, I thought that by breaking the MYSQL server out and putting it into a very fast box, would give me a speed increase in page load times.

Am I missing something, or moer likely overlooking something?

(I have a Fortinet Fortigate 100D for my firewall and am pretty confident it will handle the job of protection).

Link to comment
Share on other sites

The problem is that you are connecting to this external mysql via Internet. This means you can measure the response time of your mysql server in milliseconds. If your mysql server was in your local network or on the same computer, you'd be measuring that in microseconds. We're on a completely different magnitude of scale here.

Consider this pseudo code example.

fetch_from_mysql(something x)

if x is y then

fetch from mysql (something a)

else

fetch from mysql (something b)

It can't even get the query a or query b until x was retrieved. So if the delay between each fetch is about 10ms (a fairly speedy case), then, the 10ms one has to finish, then do another 10ms process. Then it took minimum of 20ms to process this page. If this page was local and it only took 10us to fetch, you would have spent at minimum of 20us, a 1000x difference.

Above case causes a inline execution, but that's exactly what PHP is. So, even if there are no conditions on the previous, it will always do this. So...

fetch_from_mysql(a)

fetch_from_mysql(b)

fetch_from_mysql©

will always take at minimum of 30ms.

Quite simply the problem is that the time it takes for electrons moving such distance is too damn high.

...obligatory meme pic...

Link to comment
Share on other sites

I am sorry grumpy, I misstated my problem, I have setup the Ubuntu box on my home network, but had planned (But do not know how) to have the MYSQL box on the same network as the apache/php box.

I do not know how to integrate the new Ubuntu MYSQL box on to my static IP. Is it as simple as tossing a router into the mix, or is there some other way to do it?

Thanks for helping me through this, the networking is a little over my head, but I am reading up on it and hope to get better.

Link to comment
Share on other sites

Close! I have a separate line for the web server, it has no router on it, simply a firewall, it is being fed into the Mac Pro, which currently feeds everything, Apache/PHP/MYSQL. On the home side, I do have a router, that runs another Mac Pro and currently the Linux Ubuntu box, that I want to move over to the static IP (And Current Apache/php server) to act as the MYSQL server.

So I want the Apache/PHo Mac Pro and the MYSQL Ubuntu box on the static IP. The Home IP can be ignored.

Nope, no typo, I want the boxes to be as fast as possible, so have been adding 512gb SSD's as I could. Have a further 17tb in a Drobo storage unit that handles all of the daily backups, though those are regular drives.

Link to comment
Share on other sites

c4ldxXJ.png

This is what u have?

And you are trying to do this? Or is THIS the answer you are looking for? A typical, bare minimum dedicated cloud.

v5iqbCG.png

Maybe you should draw... Because now it sounds like you are doing what I thought you were doing with the first reply again...

and on the point of 4TB of SSD... I find that to be a waste of money. :sad: (I also find all of mac computing products to be the biggest waste of money from a performance stand point...)

Static file accesses -- which is where I'm assuming the majority of your space comes from benefit very little from SSDs. So little that it's often not measurable in most cases from the end user. Only exception is if you are extremely high traffic and each files are tiny and the variety of files accessed are significantly larger than your free ram and the files accessed are spread out; a series predicates that rarely ever happens with static files.

And yes, I'm assuming the static files like downloads, images, etc are taking up your space, not mysql. If it was mysql, then you have even a greater problem as it signals a huge site (like top world 10 site...) or a huge design flaw.

Link to comment
Share on other sites

The second is exactly what I want to do. So your saying I need to stick a router between my firewall and the computers. The router will give will route (duh), the packets to the Apache/PHP box, and the Apache/PHP box will make requests to the locally connected MYSQL box (the Apache and the MYSQL box both being on the same router, no?)

Then, instead of using Localhost on the MYSQL box, I use the actual IP of the Apache box, and on the Apache box, I use the actual IP of the MYSQL box (Instead of that iteration of Localhost)?

Say, the router assigns the Apache Box to be 10.0.0.5 and the MYSQL box to be 10.0.0.6, right? Those are then used in place of Localhost?

As to the SSD's, consider this project one of that falls under the "Money is no object" kinda things.

I Started with the Mac Pro as the server, as I had some of them laying around when I set the server up. I like OS X server, but find it too constraining for what I see my system going towards. And, I fear that apple is looking at moving away from the server side of things. And, I kinda hate having the GUI running, eating up all those cycles when I could instead have a simple terminal shell.

What kind of router would you recommend (If that is the actual piece of hardware that is needed to solve the problem)? I have these two boxes to connect, but I can see in the future, maybe a couple of more boxes hanging off of it.

Link to comment
Share on other sites

Yes, just hook up a router/switch and they should see each other via local IP. Which will look like 192.168.x.x by default. I'm going to assume 0.1 for apache and 0.2 for mysql for this post just to give distinction. Then, in your IPB setting, you just need to put...

$INFO['sql_host'] = '192.168.0.2;

and from mysql users, have the host field 192.168.0.1 for the specific user that's going to connect. You can alternatively set "192.168.%" to indicate any local connection.

That's really all you need to do after physically connecting them.

As for the future choice of hardware, despite me saying that previously about mac servers, I'm not a person who's actually very picky about hardware choices. Pretty much ALL hardware from any brand will perform amicably. I'm sure some people have bad experience with some, but in the big scope, they all do what they need to do. So, the big key factor -- or rather at the lack of other factors, in my opinion and businesses who care about getting ROI asap, the price of the servers are king. The primary components, cpu, ram and hard drive are independent of the "server brand" (chassis/mobo/power supply/fans/etc). In other words, no matter who you choose, there's going to be intel and amd options for cpu, and similar for ram, hd, etc.

So, at the end of the day, who, in general, has the best price? Supermicro. Make no mistake from their butt ugly website, they are not some small no-name company. But they don't make any for the consumer, just servers. So, their names aren't thrown around as much as guys like Dell, IBM, HP, etc. It's also awesome that they include KVMoIP on many of their systems (something of a significant premium before and still is with other brands) with their servers -- something I'm loving. So, they're pretty much the most popular right now among small webhosts and people getting few servers.

Who, in general, has the worst price? Apple... They also have a really tiny market share. So, it makes sense for them to move away from this market.

... After writing all that, I read your question again and you actually asked for ROUTER choice... not servers... Don't feel like erasing all that hard work. lol

To that question. xD Ditto. Doesn't really matter much. Most routers have no problem handling half a dozen computers/servers. Just don't pick up something that's like $30... I don't think you'll fancy a feature heavy router right now anyway, especially since you have a separate firewall. and get a gigabit router... and get some cat6 cables to network all this...

---------

Further community resource to learn about these stuff...

http://serverfault.com/ - Server only stuff (no shopping questions like what product do I get?)

http://superuser.com/ - Includes home/office networking (no shopping questions)

http://www.webhostingtalk.com/ - Probably largest hosting forum. (you can ask shopping questions)

Link to comment
Share on other sites

Excellent, I spent an hour going over Supermicros website, they have some fantastic product, one motherboard of theirs allows 512gb of ram.

I will get the best router I can find (right now I am using Airport Airport Extreme for my home setup), I will do some research as to what is the best.

Thanks for all your help Grumpy!

Link to comment
Share on other sites

That router looks perfect. I am not running any business on it, but I do have a very active local community, that gets all of it's local news from me. Along with a whole lot of neighbors who are connected.

Found the router on Amazon, with what Grumpy has told me and this hardware, I ought to be OK.

Thanks!

Link to comment
Share on other sites

use it here as I needed vpn and have had good luck. may not be the fastest one out there, but lifetime warranty is nice. its actually been really nice, had one lan port go bad (really not a huge issue as I just feed switch from there) and they replaced unit no questions asked.

keep in mind dual wan does not mean you plug the same dsl/cable/whatever in twice, its 2 distinct providers/accounts.

lot of people assume you can just split your incoming and it works.

however if one wan port fails you can just swap cable to second and be good.

Link to comment
Share on other sites

I have a T1 feed for my forum, and I have a business cable system already run in (I just have it to test running servers with - TW gets snotty about running servers on the non-business line). So I will be able to plug both in. That is cool.

It does routing though? Thats what I need from what Grumpy says.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...