LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Feedback on my LAMP Setup (https://www.linuxquestions.org/questions/linux-server-73/feedback-on-my-lamp-setup-584347/)

mantissa 09-13-2007 02:08 AM

Feedback on my LAMP Setup
 
Hey all,

I needed some advice for the hosting of an application that I'd developed. The LAMP application is essentially a site for a natural wildlife reserve which is expected to receive a high amount of traffic and fashions a combination of streaming videos, forums, profiles, as well as webcam views from across the park. Users will need to register and will maintain their own interest profiles as well.

Now for the setup, I have 4 servers at my disposal which have the following setup for each of them:
  • 2xAMD Opteron 2Ghz
  • 2GB RAM
  • 320GB HD RAID

The environment I see having for the web/db servers is:
  • Debian Linux 4.0 Etch
  • Lighttpd
  • PHP5/ MySQL 5.1
  • Fast-CGI
  • eAccelerator

All the 4 servers are connected to each other over 1Gb ethernet and are in the same subnet. For the setup, I'm hoping to have the following layout:

Server1:
Web server load balancer
MySQL Master

Server2:
Web server 1
MySQL Slave 1

Server3:
Web server 2
MySQL Slave 2

Server4:
Video Converter Server (to convert uploaded videos by users or admin to FLV)
MySQL Slave 3

I just wanted to get a sanity check on my design for the network and how I intend to lay things out. Is there anything I'm doing horribly wrong? How have others managed when working with a finite number of servers? Is there anything I'll have to be considerate of further?

I welcome your feedback! :)

andyccn 09-15-2007 05:57 AM

From what I've heard about Lighttpd, it's best left for static content - e.g. images/thumbnails. Apache has received much more testing and is better suited to mission-critical dynamic applications. Personally I'd go with that, and just compile in the modules you need to keep the binary as efficient as possible.

On a side-note - MySQL 5.1 hasn't been released as stable yet - there's probably no major issues with it, but there are more releases for 5.1 coming out than for the current-stable 5.0.

Obviously, if you've not got much of a budget to fork out for a hardware load-balancer, you're setup looks good - but I can see the first machine with the load-balancer being a single point-of-failure. If you can afford a hardware load-balancer, get one.

Otherwise, I'd have machines 1 and 2 being identical - HTTP load-balancer/MySQL - and 3/4 identical - web-server/video converter. Have a low TTL on the external DNS for the website (e.g. 5 minutes) which during normal setup sends users to server 1 or 2, which then gets it's content from 3 or 4.

If either 1 or 2 fail, change the external DNS to point to the correct working server while you fix the other one. Same as 3/4, except that will be invisible to outside users.


All times are GMT -5. The time now is 06:33 AM.