Results 1 to 17 of 17
  1. #1

    Seperate web server and db server or?

    Hey all, im currently planning to launch a number of sites that may or may not take off. Basically my question is that most people tell me to seperate the web server and db server, and i believe this is because of interfering IO between the two, and the cpu not being able to alocate between both of them effectively. How effective do you think a Dual Xeon box would be to run apache,squid,php, and mysql. I figured my original plan was 2 servers (each xeons for the db with a raid1+0), but going a dual xeon seems like a decent choice since we would only need to pay for 1U at a colo with opportunity to move the db off of it later when we need to and replicate the webserver when needed. Let me know if im off my mark here. I didnt post req/sec or anything because this is just a seperate xeon boxes VS dual xeon single box. Thanks!!

  2. #2
    Join Date
    Mar 2003
    Location
    Kansas City, Missouri
    Posts
    462
    Hello,

    Your application usually will not introduce I/O quite as much as your database will. To stay on the conservative side, I would say lean toward a single server and have a good plan to scale if needed. With most applications, changing to a dedicated database server would be very simple (export database, import on new server and adjust application(s) configuration)

    Hope that helps :-)
    =>Admo.net Managed Hosting
    => Managed Hosting • Dedicated Servers • Colocation
    => Dark Fiber Access to 1102 Grand, Multiple Public Providers
    => Over •Sixteen• Years of Service

  3. #3
    Join Date
    Oct 2009
    Posts
    856
    All depends on what load you're expecting. There's nothing technically "bad" about running Apache and MySQL on the same server, unless the load is high enough that either of them overwhelms the server. RAM is usually the limiting factor.

    If you're not expecting a high-traffic site right off the bat, going with a single server is probably good enough. Moving MySQL to another server whenever you reach capacity is a fairly trivial process as well. I started out with one server for absolutely everything, and as it grew stuff was split up and duplicated as needed.

  4. #4
    Join Date
    Jun 2003
    Location
    The Netherlands
    Posts
    277
    I agree with the other posters: just stick to a single server for now. With some reasonably smart caching, you should be able to handle approx. 10-20k visitors per day easily.

    But, if it's not too hard, try to plan ahead a little and prepare your applications for a scenario where you have to scale to multiple servers.
    There are 10 kinds of people, those who understand binary and those who don't.

  5. #5
    awesome, thanks for the quick responses guys. Im super nervous about all of this because im new at it . But yeah i agree money wise and simplicity wise im def doing the single server.

  6. #6
    Join Date
    Nov 2003
    Location
    Marylebone, London, UK
    Posts
    526
    Don't forget that data, which could be updated/viewed or used otherwise
    doesn't always fit well with a mysql db (or other relational db).
    Think of yahoo's or google's userdb (udb if it sounds better to you).
    Many other examples exist too. Problem is user needs to access it (well, via
    your apps anyway), other may require to have some views of it (partner sites?)
    and if you want lots of clusters of local machines around the world, figure
    out how to deal with the data, and not stick it into an off-the-shelf
    relational database, which can work against scaling plans.

    Mysql and others have their uses, but not always a good first choice.

  7. #7
    Join Date
    Jun 2003
    Location
    The Netherlands
    Posts
    277
    Quote Originally Posted by aimbot View Post
    awesome, thanks for the quick responses guys. Im super nervous about all of this because im new at it . But yeah i agree money wise and simplicity wise im def doing the single server.
    Just think of all the fun you'll have and how much you'll learn

    Oh, and think of a solid backup plan. You will hate yourself if you have to learn this the hard way.
    There are 10 kinds of people, those who understand binary and those who don't.

  8. #8
    yeah definitely. im thinking of using my vps servers at rackspace to do that since i think it wouldnt cost too much. And then they do daily backups of that server as well.

  9. #9
    Its me again! Ive picked out the server specs as best as I could. Granted there are a couple things that could be improved (SCSI drives for one) but i think besides that this should be good.

    Just to say we are hesitant to rent servers because we dont know how fast or slow the traffic would come on. So an initial bigger investment with lower monthly cost just for a colo for a 2U seemed alot more attractive.

    2 x Intel Xeon W3520 Bloomfield 2.66GHz LGA 1366 130W Quad-Core Server Processor Model BX80601W3520 - Retail

    2 x Crucial 6GB (3 x 2GB) 240-Pin DDR3 SDRAM DDR3 1333 (PC3 10600) Triple Channel Kit Desktop Memory - Retail

    1 x ASUS Z8NA-D6C Dual LGA 1366 Intel 5500 ATX Dual Intel Xeon 5500 Series Server/Workstation Motherboard - Retail

    2 x Rosewill RC-211 Silicon Image 2 port SATA II PCI Express Host Controller Card(RAID 0/1/JBOD) - Retail

    4 x Western Digital Caviar Black WD6401AALS 640GB 7200 RPM SATA 3.0Gb/s 3.5" Internal Hard Drive -Bare Drive

    2 x Rosewill RC-211 Silicon Image 2 port SATA II PCI Express Host Controller Card(RAID 0/1/JBOD) - Retail

    1 x CHENBRO RM22300-300 2U Rackmount Cost Effective Server Chassis with PS/2 PSU Solution - Retail
    (getting rails for case)

    2 x cpu fans and paste

    questions and explanation
    -------------------------
    I dont think we can afford SCSI drives atm. So running two raid 1's should do (i think). one for boot stuff, and webserver stuff and the mysql logs, and the other for the db data? Also do i need two raid cards to run two raid 1's? General criticism is welcomed! go ahead cut me up! i dare yah! lol Thanks guys.

    Total cost: $1,743.84

    *Had to take out all links because i dont have five post yet.

  10. #10
    Join Date
    Jun 2003
    Location
    The Netherlands
    Posts
    277
    One point about RAM: I'd definitely go for ECC on a server.

    Keep in mind that for colo, you need to have a way to get your server fixed if there's a hardware issue, either by doing it yourself or by people from the DC. I don't know what's all possible with colo these days, but my opinion is that in terms of pricing, you won't have a big margin vs. rentals. Additionally, if your project does happen to flop, you only pay for the month(s) you used the server.
    There are 10 kinds of people, those who understand binary and those who don't.

  11. #11
    True, and yeah I definitely should of picked ECC for more stable memory. And yeah im in the metro DC area so im still looking for a nearby colo (not too far from VA too). Thanks for the info on the rentals, ill keep it as an option since it does make sense too.

  12. #12
    Join Date
    Mar 2009
    Posts
    2,218
    Quote Originally Posted by aimbot View Post
    Hey all, im currently planning to launch a number of sites that may or may not take off. Basically my question is that most people tell me to seperate the web server and db server, and i believe this is because of interfering IO between the two, and the cpu not being able to alocate between both of them effectively. How effective do you think a Dual Xeon box would be to run apache,squid,php, and mysql. I figured my original plan was 2 servers (each xeons for the db with a raid1+0), but going a dual xeon seems like a decent choice since we would only need to pay for 1U at a colo with opportunity to move the db off of it later when we need to and replicate the webserver when needed. Let me know if im off my mark here. I didnt post req/sec or anything because this is just a seperate xeon boxes VS dual xeon single box. Thanks!!
    It's generally better to use a single server, unless the web site load is so high that the database server cannot cope with it.

    The reason is that there can be many transactions, and huge amounts of data, between an application and the database server software, and it slows things down to have that happen over a network link ... network links are generally slow, 1gbps or slower.

    As for interfering IO - you can still have separate disks, even if the database server software and web server software are running in the same physical hardware. There are plus and minsu to using separate disks; the plus is that it makes things more predictable, the minus is that overall performance is worse.

    If you are going to have separate machines, the fastest connection will be with a simple Cat6a cable - you do not need to go via a switch. You will probably still need the database server hardware connected to the network for build and management purposes though.

  13. #13
    Ok cool i picked up some ECC registered ram. was i correct in my assumption that you need two raid cards to run two raid 1's (4 drives)?

  14. #14
    Join Date
    Mar 2003
    Location
    chicago
    Posts
    1,557
    i would spend a few $$$$ on a better raid controller what you picked is garbage.

  15. #15
    suggestions?
    considering i thought a raid 1 was near the most basic of the basic any card would do.

    And do i need two in the first place to run two raids?

  16. #16
    Join Date
    Jun 2003
    Location
    The Netherlands
    Posts
    277
    I don't have experience with RAID myself, but I have read various stories of people who lost all their data because their RAID card failed. So I agree with the other poster that you should look into this carefully. And, if you have a lot of data, rebuilding in case of a HD failure can be a pain too.

    You might also look into using SSD, particularly for your database.
    There are 10 kinds of people, those who understand binary and those who don't.

  17. #17
    Join Date
    Oct 2009
    Posts
    856
    If you want 4 disks, you might as well go for RAID-10. It will give you the same redundancy as two RAID-1s, except that the load is by design balanced between all four disks. A 4-port 3ware or Adaptec hardware controller that does RAID-10 is a bit more expensive than the ones you picked out, but it's significantly better on the long term.

    But remember: RAID IS NOT BACKUP. You absolutely have to set up a good backup routine if you don't want to wake up to a dead server and no data nine months from now.

Similar Threads

  1. Should I seperate my SQL Server from my dedicated server?
    By seefresh in forum Dedicated Server
    Replies: 14
    Last Post: 08-17-2006, 06:27 PM
  2. Seperate Database Server?
    By Captian_Spike in forum Hosting Security and Technology
    Replies: 8
    Last Post: 04-02-2005, 10:01 AM
  3. Do I need a seperate server for MySQL?
    By doooby in forum Dedicated Server
    Replies: 16
    Last Post: 01-20-2005, 08:36 PM
  4. PHP Server and MYSQL server => seperate
    By Cyrax in forum Hosting Security and Technology
    Replies: 2
    Last Post: 02-24-2004, 10:00 AM
  5. MySQL on a seperate server
    By letsgo in forum Hosting Security and Technology
    Replies: 1
    Last Post: 02-02-2004, 05:45 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •