gagadaily
By:
gagadaily

DO for large website?

August 2, 2013 3.6k views
Hi, I run a large website with about 700,000 visitors, 7,000,000 pageviews and 4 TB of traffic recorded during our busiest month ever. Do you think DO is suitable for a site like this? If yes, which plan would you recommend. We're currently with Hostagor Pro dedicated server (http://www.hostgator.com/dedicated). Thanks in advance!
8 Answers
With that many visitors, why put all your eggs in one basket (i.e. 1 server)? I'm no expert, by any means, but my first inclination is that you should (i) set up an Nginx load balancer; (ii) two web servers w/Varnish; and (iii) MySQL on its own multi-core server w/Memcache... and I bet you could do it for less than what you're paying now.

Check out: 10 Million hits a day with WordPress using a $15 server, as a loose-fitting example.
As Pablo said, I would recommend having a horizontally-scalable cluster. Start off with 1 nginx load balancer, 2 nginx webservers, and 1 database server (2GB would be fine, but it mostly depends on your application).

The total monthly cost would be about $35 if you go with 512MB droplets for the load balancer and the webservers. Nginx should handle a lot of load on 512MB so I'd say you start off with a 512MB load balancer and two 512MB web servers, and scale up as needed by adding more webservers to the cluster. You can either create a new database server with master-master replication or scale your database server to the next plan.

Once you reach the point where one load balancer is not enough, add another load balancer with its own set of webservers and have it on a round-robin DNS setup.

Even if you do that, it would still cost you less than 1/3 of what you're currently paying.

Let me know how it goes :]
@kamal, Is there any manual for the above steps for load balancing? Is it possible to start with 512mb ubntu/apache/mysql and then migrate to the above configurations with load balancing stuff with apache/nginx. I am total newbie in this.
It would be great if someone can give some pointers.

Thanks
Amit
@hypertextsol: https://www.digitalocean.com/community/articles/how-to-set-up-nginx-load-balancing for the load balancer, any LAMP/LEMP article for the webservers, and 'sudo apt-get install mysql-server' for the database servers (assuming you're using mysql).
by Etel Sverdlov
This article covers how to set up a simple load balancer on a DigitalOcean droplet with nginx. The tutorial covers setting up a round robin loadbalancer that can then direct site visitors to one of a set of IPs
by Etel Sverdlov
This article covers how to set up a simple load balancer on a DigitalOcean droplet with nginx. The tutorial covers setting up a round robin loadbalancer that can then direct site visitors to one of a set of IPs
Thanks for the replies everyone.

@kamal Is it possible for DO support to set that up for me (at an extra cost, of course)? I'm new to this and would probably not be able to do it on my own.
@gagadaily I have just made this setup my self, and it works well, but note that if you website uses the PHP SESSION var, you will need to do extra setup or put the session data in the mysql server.

I am right now writing a DO Tutorial on this setup as I have seen none that explain it well or how I like it done, :)
@gagadaily: Unfortunately we are an unmanaged VPS provider and do not provide installation services.

@Leckoren: http://wiki.nginx.org/NginxHttpUpstreamModule#ip_hash ;)
Have another answer? Share your knowledge.