Shining a light on web sites with LAMP
As stated in part I web sites can be broken down into halves, the front end or browser side and the back end or server side. In this article we’ll be discussing the server side and in particular that set of tools collectively know as LAMP.
Server Side with LAMP
LAMP stands for Linux, Apache, My Sql, Php and is currently the most frequently used mix of technology on the server side – commonly referred to as a “web stack” or more specifically a “LAMP stack”. Linux is the operating system that hosts the entire system and both an Apache Web Server and a My Sql database run within that operating system. Php is a programming language that can be run within an Apache web server and has excellent support for interacting with databases such as My Sql. With Php we can serve back dynamically changing content when we receive a request for a given web page or other types of content. As a brief aside, in lieu of Php some development shops opt for Python or Perl, Php however is the most prevalent. All of the components in a LAMP stack are open source and free – a primary reason for it’s popularity.
A word about hosting
Although LAMP may be free the hardware that it runs on is not. In order to run a CMS such as wordpress for example that runs on top of a LAMP stack you will need to purchase hosting plan. Plans run anywhere from less than $5 a month to hundreds of dollars. The difference in price depends on things like disk space, bandwidth, server memory, processing power, support, and the type of access to the system you desire. If you’re reading this article with an eye towards developing and supporting your own site you are definitely under $50 a month for a plan. On the higher end you will encounter things like “dedicated servers” where you have an entire machine somewhere that is dedicated to only running your site. On the lower end you have “shared hosting” sometimes called “virtual hosting” where you’re site is on a machine with many other sites and a single web server serves content for all the sites. The middle ground is what is called “Virtual Private Servers” or VPS as well as their counterparts Managed VPS. Below I enumerate the most common options with brief descriptions as well as some pros and cons.
Shared Hosting – Inexpensive and low end hosting solutions. All sites on a shared host exist on a single web server with no dedicated resources.
- Pro: Really cheap – sites can be had for $5 or less.
- Con: Resources are limited and shared. If another site on the system should bog down the server your sites performance will be directly effected.
- Virtual Private Server – A moderately priced solution where although a physical machine is still shared between multiple sites you have a dedicated portion of that machine.
- Pro: More power, more configuration options, your site will not be impacted by other sites usage of resources.
- Con: More work to run than a shared hosting option. With more flexibility usually comes more complexity.
- Managed VPS – The benefits of a Virtual Private Server but without the extra work required to configure. Typically managed VPS sites are pre-configured for given use (e.g. WordPress)
- Pro: If you can find a Managed VP solution that fits your needs setup and maintenance is no more complicated than a shared solution, possibly less.
- Con: A little more expensive than VPS and you must fit a particular use case to take advantage of this option.
- Dedicated Server
- Pro: The sky is the limit regarding configuration options (or perhaps more accurately, your wallet is the limit)
- Con: Expensive and complex. Dedicated can go for several hundred and as stated previously with more flexibility comes more complexity.
So now we’ve gained an understanding of what is meant by “front end” vs “back end” – essentially what takes place within the browser (rendering and display) vs what takes place on the server; location and transmission of content from files, database, and executed programs (e.g. Php) to the browser. We’ve also acquired some information on common options for hosting our server – pros and cons. This has been a high level discussion and limited to the most prevalent configuration on the web. A basic server side configuration will consist of these four primary options:
- “L” – An Operating system (Linux)
- “A” – Web Server (Apache)
- “M” – A Database (My Sql)
- “P” – A Programming Language (Php)
Know these four and you should be able to get an understanding of the additional options available by placing them in terms of these and the purposes they serve.