Chat LIVE With Programming Experts! There Are 23 Online Right Now...

Welcome to Dream.In.Code
Become an Expert!

Join 244,117 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,380 people online right now. Registration is fast and FREE... Join Now!




Multiple Server Configurations

 
Reply to this topicStart new topic

Multiple Server Configurations

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

Head DIC Head
Group Icon

Joined: 17 Mar, 2001
Posts: 16,437



Thanked: 117 times
Dream Kudos: 1650
Expert In: Web Development

My Contributions
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
+Quote Post


spearfish
RE: Multiple Server Configurations
12 Mar, 2008 - 05:54 AM
Post #2

Monkey in Training
Group Icon

Joined: 10 Mar, 2008
Posts: 746



Thanked: 5 times
Dream Kudos: 225
My Contributions
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
+Quote Post

Nova Dragoon
RE: Multiple Server Configurations
12 Mar, 2008 - 06:03 AM
Post #3

The Innocent Shall Suffer, Big Time
Group Icon

Joined: 16 Aug, 2001
Posts: 6,169



Thanked: 27 times
Dream Kudos: 515
Expert In: Python, Linux

My Contributions
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
+Quote Post

spearfish
RE: Multiple Server Configurations
12 Mar, 2008 - 06:23 AM
Post #4

Monkey in Training
Group Icon

Joined: 10 Mar, 2008
Posts: 746



Thanked: 5 times
Dream Kudos: 225
My Contributions
But I don't like spam!
User is offlineProfile CardPM
+Quote Post

1lacca
RE: Multiple Server Configurations
12 Mar, 2008 - 06:29 AM
Post #5

code.rascal
Group Icon

Joined: 11 Aug, 2005
Posts: 3,822



Thanked: 22 times
My Contributions
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
+Quote Post

PsychoCoder
RE: Multiple Server Configurations
12 Mar, 2008 - 06:39 AM
Post #6

loves.Coding(this);
Group Icon

Joined: 26 Jul, 2007
Posts: 12,265



Thanked: 372 times
Dream Kudos: 10775
Expert In: VB, VB.Net, C#, SQL, ASP, ASP.Net, Web Development, HTML, CSS, Win32 API, Javascript, mySQL, J#, Boo.Net, jQuery

My Contributions
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 offlineProfile CardPM
+Quote Post

skyhawk133
RE: Multiple Server Configurations
12 Mar, 2008 - 06:44 AM
Post #7

Head DIC Head
Group Icon

Joined: 17 Mar, 2001
Posts: 16,437



Thanked: 117 times
Dream Kudos: 1650
Expert In: Web Development

My Contributions
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
+Quote Post

1lacca
RE: Multiple Server Configurations
12 Mar, 2008 - 06:47 AM
Post #8

code.rascal
Group Icon

Joined: 11 Aug, 2005
Posts: 3,822



Thanked: 22 times
My Contributions
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
+Quote Post

Nova Dragoon
RE: Multiple Server Configurations
12 Mar, 2008 - 06:59 AM
Post #9

The Innocent Shall Suffer, Big Time
Group Icon

Joined: 16 Aug, 2001
Posts: 6,169



Thanked: 27 times
Dream Kudos: 515
Expert In: Python, Linux

My Contributions
If you have a gigabit connection between the two you really wont see much of anything
User is offlineProfile CardPM
+Quote Post

PsychoCoder
RE: Multiple Server Configurations
12 Mar, 2008 - 07:07 AM
Post #10

loves.Coding(this);
Group Icon

Joined: 26 Jul, 2007
Posts: 12,265



Thanked: 372 times
Dream Kudos: 10775
Expert In: VB, VB.Net, C#, SQL, ASP, ASP.Net, Web Development, HTML, CSS, Win32 API, Javascript, mySQL, J#, Boo.Net, jQuery

My Contributions
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 offlineProfile CardPM
+Quote Post

1lacca
RE: Multiple Server Configurations
12 Mar, 2008 - 07:08 AM
Post #11

code.rascal
Group Icon

Joined: 11 Aug, 2005
Posts: 3,822



Thanked: 22 times
My Contributions
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
+Quote Post

skyhawk133
RE: Multiple Server Configurations
12 Mar, 2008 - 07:12 AM
Post #12

Head DIC Head
Group Icon

Joined: 17 Mar, 2001
Posts: 16,437



Thanked: 117 times
Dream Kudos: 1650
Expert In: Web Development

My Contributions
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
+Quote Post

no2pencil
RE: Multiple Server Configurations
12 Mar, 2008 - 07:04 PM
Post #13

Unix Ronin
Group Icon

Joined: 10 May, 2007
Posts: 10,437



Thanked: 198 times
Dream Kudos: 2725
Expert In: Goofing Off

My Contributions
QUOTE(skyhawk133 @ 12 Mar, 2008 - 06:37 AM) *

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

By no means is my network pushing large traffic, but my network/web hosting currently runs on 3 servers.

1.) Web Server / MySql : Dell PowerEdge 350 w/ Sun D1000 attached Storage
2.) email server : Sun X1 500mhz
3.) XRMS Ticketing Software & internal test environment : Sun X1 500mhz

When any software on the 2 Sun Boxes needs to connect to the MySql database, I just issue the -h option, works flawlessly. & anytime a web app needs to use email, I follow this setup.

I have no idea if there are any advantages or disadvantages to this setup as far as speed. However, I have a few double-check measure in place so if security should get circumvented, or a server should experience hardware failure, the site(s) doesn't just puke.

User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 7/4/09 02:32AM

Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month