Welcome to Dream.In.Code
Getting Help is Easy!

Join 85,023 Programmers. There are 1,295 online right now! Ask your question and get quick answers from Dream.In.Code experts. Join the #1 programming help community on the internet! Registration is fast and FREE... Join Now!

Chat LIVE With a Expert
Powered by LivePerson.com

Register to Make This Box Go Away!

Multiple Server Configurations

2 Pages V  1 2 >  
Reply to this topicStart new topic

Multiple Server Configurations

skyhawk133
post 12 Mar, 2008 - 06:37 AM
Post #1


Big Money... No Wammies!

Group Icon
Joined: 17 Mar, 2001
Posts: 13,464



Dream.In.Code is currently running on a single server that both the database, email, and web server reside on.

I'm thinking of going to a multi-server configuration, but wanted to hear what some of you have setup for large sites.

What I'm thinking is just a simple database server and web server, but that may grow in to multiple load balanced web servers and seperate email servers.

The MySQL database on DIC currently gets over 220 queries/second during peak hours and that pushes the server pretty hard, but isn't hurting it yet, so I'm just doing some pre-planning.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post


spearfish
post 12 Mar, 2008 - 06:54 AM
Post #2


Monkey in Training

Group Icon
Joined: 10 Mar, 2008
Posts: 632

I'm on a shared server with a hosting company right now, so I can't really help you ;-)

But one thing I've noticed about your site that should help, at least a bit, is your "who's here" section, particularly the online stats --- perhaps that could be reverse proxy cached and update every five minutes.... that'd be one querey per five minutes (through a cron job?), rather than one more with each page view.

Sorry if I'm totally off on this, or what reverse proxies are, I just remember seeing a small snippet about them somewhere.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Nova Dragoon
post 12 Mar, 2008 - 07:03 AM
Post #3


The Innocent Shall Suffer, Big Time

Group Icon
Joined: 16 Aug, 2001
Posts: 5,746

Right now all of our services have one server to themselves.

And thats taking care of everything so far. We have to start clustering email soon, our volume has increased 5 fold in the last 2 years.
We're holding 23 gigs of spam from the last month.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

spearfish
post 12 Mar, 2008 - 07:23 AM
Post #4


Monkey in Training

Group Icon
Joined: 10 Mar, 2008
Posts: 632

But I don't like spam!
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

1lacca
post 12 Mar, 2008 - 07:29 AM
Post #5


code.rascal

Group Icon
Joined: 11 Aug, 2005
Posts: 3,132

The main application that we develop right now is usually deployed on a server that runs an application server (however sometimes it runs other applications as well), and the database is on a different server. It works quite well.
A friend of mine was working on a really big social networking site, and there they had all kind of perv setup, I think they had a single DB, some squid proxies, and a bunch of web front ends, and also some fileservers for the pictures - I might have wrote some bs here, as he was always ranting about it during binge drinking, so although I found it interesting, I am not sure if I remember correctly.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

PsychoCoder
post 12 Mar, 2008 - 07:39 AM
Post #6


Code Or Die!

Group Icon
Joined: 26 Jul, 2007
Posts: 5,833

The company I now work for has 15 servers total, 10 web, 1 email, 3 database (MSSQL), and we use a load balancing software, but this software I believe is for Windows servers so I'm not sure if this exact piece of software will work for Apache servers (but don't quote me on that). Ill get the name of the software for when I VPN in today smile.gif
User is online!Profile CardPM
Go to the top of the page
+Quote Post

skyhawk133
post 12 Mar, 2008 - 07:44 AM
Post #7


Big Money... No Wammies!

Group Icon
Joined: 17 Mar, 2001
Posts: 13,464

QUOTE(spearfish @ 12 Mar, 2008 - 07:54 AM) *

I'm on a shared server with a hosting company right now, so I can't really help you ;-)

But one thing I've noticed about your site that should help, at least a bit, is your "who's here" section, particularly the online stats --- perhaps that could be reverse proxy cached and update every five minutes.... that'd be one querey per five minutes (through a cron job?), rather than one more with each page view.

Sorry if I'm totally off on this, or what reverse proxies are, I just remember seeing a small snippet about them somewhere.


Thanks for the suggestion spearfish, the number of queries really isn't a problem, Dream.in.code is just growing very rapidly.

I've actually optimized a lot of the site already. The who's online box is stored in a HEAP which is all memory so the queries to that are extremely fast.

That's another question I have. For those of you that have gone from a single server config to a web + database config, did you see a performance hit due to latency?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

1lacca
post 12 Mar, 2008 - 07:47 AM
Post #8


code.rascal

Group Icon
Joined: 11 Aug, 2005
Posts: 3,132

Not really, but it depends on your queries. If you do a lot of filtering in your application and not in the query, then it can cause latency problems because a lot of data has to be transmitted through the wire.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Nova Dragoon
post 12 Mar, 2008 - 07:59 AM
Post #9


The Innocent Shall Suffer, Big Time

Group Icon
Joined: 16 Aug, 2001
Posts: 5,746

If you have a gigabit connection between the two you really wont see much of anything
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

PsychoCoder
post 12 Mar, 2008 - 08:07 AM
Post #10


Code Or Die!

Group Icon
Joined: 26 Jul, 2007
Posts: 5,833

Our database server is separate from the web servers and I notice no lag at all. I believe it mostly depends on how you have it set up and the connection between the 2 as Nova pointed out.
User is online!Profile CardPM
Go to the top of the page
+Quote Post

1lacca
post 12 Mar, 2008 - 08:08 AM
Post #11


code.rascal

Group Icon
Joined: 11 Aug, 2005
Posts: 3,132

I would say it depends, if it is a dedicated line for just your application, it might be the case, but if it sits on a network, then other traffic might change the picture.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

skyhawk133
post 12 Mar, 2008 - 08:12 AM
Post #12


Big Money... No Wammies!

Group Icon
Joined: 17 Mar, 2001
Posts: 13,464

The datacenter that DIC is at has 2 networks, a public network (what you're viewing DIC on right now) and a private network (called the softlayer), the private network is a full gigabit network between servers. So hopefully if I go that route I'll have full gig between boxes.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

2 Pages V  1 2 >
Fast ReplyReply to this topicStart new topic
Time is now: 5/10/08 03:18PM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month