Popular server setups for web sites/applications

Of course, every web site/application (let’s say web app) is different, so there’s no universal setup that is good for everyone.

However, I was looking at possible server setups and these are the most common—and among these one should be able to find a solution that would work well enough for most kinds of projects.

Single server setup

Single server setup

This is definitely the most common setup.

Your application runs on a single machine—could be shared, dedicated virtual/physical—and includes your whole development environment (PHP, Ruby, etc.), database (MySQL or whatever),  and storage.

This configuration is good for small to medium-sized websites that aren’t expected to grow that much, where high availability is not a main concern (make sure you have a reliable backup system in place).



Separate database server

separate database server

Let’s say you have a virtual or dedicated machine and private networking. You can separate the database management system—or DBMS—to improve performance and security.



Load balancing

Load balancer (reverse proxy) example

Now we’re talking. This is a good-enough setup for many websites and apps.

You have a load balancer (reverse proxy), which distributes incoming traffic between two separate machines which both run your app. Then, these are connected to a forth server with the database.

NOTE: if you’re wondering, a reverse proxy is the opposite of a proxy (called a forward proxy, you might have used one at school or at the office to visit Facebook or YouTube if the IT department blocked those sites). A [forward ]proxy is set up so that your computer (A) goes through B to serve you C, so that if C is blocked you can still see through B. With a reverse proxy, the exact opposite happens: the website makes you go through B while you want to visit C (hence the “reverse”). You normally shouldn’t notice this happening.

Some software you can use to implement reverse proxy load balancing is HAProxy, Nginx, and Varnish.



Load balancing + database replication

Load balancing + DB replication

This technique allows better performance while both reading and writing to the DB. Although it does NOT provide a complete failover mechanism, it’s still a very popular setup for medium-sized web apps.

Basically, we’re not going to have two database servers: one for reading, and one for reading and writing, which also syncs its content with the read-only machine.




These are popular setups to host your web application. I’m looking into a lot of cool stuff which I’ll write about it, and will update this with more info.

For this article I started with the excellent article from Digital Oceanhttps://www.digitalocean.com/community/tutorials/5-common-server-setups-for-your-web-application (hopefully with a simpler language but regardless writing works for me to learn).

Clip art are icons taken from the awesome free iOS 7 icon pack by Icon8—released under the Creative Commons Attribution-NoDerivs 3.0 Unported license—which I changed around and mixed together.

If there are any mistakes, please let me know in the comments! :-)

Liked it? Share it!
Tweet about this on Twitter0Share on Google+0Share on Facebook0Share on LinkedIn0Share on Reddit28Digg thisShare on StumbleUpon54

Leave a comment