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

i have a php search engine, running on apache, hosted on centos 5 vps, no mysql, nothing really, just a bunch of php files, i have in average 600 visitors, i need more bandwidth, i want to host my site on 4 vps to distribute the bandwidth, the question is how?

my vps is really cheap, so i don't want to change my provider, i just want to know how to host a website on many vps, that's all

share|improve this question
1  
A simple solution would be using round-robin DNS by having the same DNS name point to the different IP addresses of your many VPS. See en.wikipedia.org/wiki/Round-robin_DNS –  ahans Nov 6 '11 at 11:40
    
You're running out of bandwidth with 600 visitors a day?! –  ceejayoz Nov 6 '11 at 13:34
    
@ceejayoz yeah i have 1 tb of bandwidth, we just started the month and the site have used 21% of the bandwidth available, it's gonna run out of bandwidth before the end of this month, on weekends i have like 3000 visitors, it's an mp3 download site –  Eli Nov 6 '11 at 16:53
    
If you're using a terabyte of bandwidth on a super-cheap VPS host you're probably going to get cut off at some point, which would be my larger concern. –  ceejayoz Nov 6 '11 at 18:52
add comment

1 Answer 1

up vote 2 down vote accepted

ahans already mentioned "Poor man's load-balancing" (a. k. a. DNS round robin) in the comments. This is the easiest possibility given your web site is stateless and doesn't rely on data (like user state) being preserved over requests. As soon as you have server side session data you'll need to synchronize that between your servers or use "sticky sessions" (always server a single user's requests from the same system).

Additionally you could split up the assets of your site (e. g. static pages, images, CSS, etc.) and have them served by a separate server with a high caching time out so that clients fetch them once and keep them for a longer period of time.

share|improve this answer
    
I don't have much of images and css –  Eli Nov 6 '11 at 16:55
add comment

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.