Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I am thinking of a possible web server set up for our web project at a datacenter. We will have at top 1 million unique visitors per day.

We will do light jobs mostly like rendering pages, our "hardest" task would be generating a single page PDF report for users when they request and charging money from their credit cards when they do purchasings.

Which one would be more a more clever and stable way of doing it:

  • A single server that holds either web server (apache, php etc) and database (mssql)

  • Two servers, one holds web server(apache, php etc) and another server for database (mssql).

Also you can recommend your own idea of ideal setup :)

A bonus question: Would it be more clever to buy our own servers and buying co-locationing or directly buying dedicated server from datacenters.

Thanks

share|improve this question

2 Answers 2

up vote 2 down vote accepted

i dont know how cpu intensive your business logic is, what are your hopes/plans for growth. but i would start with having scalability in mind, even if now it's a bit of overkill.

you can run all machines on one-two beefy servers as virtual machines and later add more hardware - this will obviously be less efficient, but will make handling growth in the future easier.

my take would be:

  • pair of reverse proxy with failover mechanism so one is active one is passive. you can start with apache2 or nginx, later move to hardware solution. failover between servers can be done with heartbeat.
  • load-balancing mechanism within a proxy distributing your traffic between actual application servers and handling failure of any
  • two application servers at the beginning
  • either sticky sessions [ so client once connecting with appserv #n gets all her queries server from it ] or separate session server [ as everything else made highly available ]
  • is possible partitioned mysql databases [ again - very much dependent on your requirements and dataset, if you cannot imagine ever having more than say 5-10GB of data - maybe there is no need for that ]. each instance protected with either drbd replication or master-slave or master-master replication.

if you go for virtualization approach you can start with rented machine and figure out later what to do... vms are quite portable beasts.

all of this might be overkill but i think at least reverse proxy in front + virtualization are worth implementing, while partitioning is good to think about.

share|improve this answer

I would vote for two separate servers. I recommend reading the answers to this post, which talks about whether it is better to have two machines or one: http://serverfault.com/questions/107673/questions-about-single-point-of-failure-for-small-operations

There are a lot of good arguments there for why it is better to separate our the apps on multiple servers.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.