Communication with php pogram
Friday October 31st 2014

Building Blocks for the Modern Web Application





penguinPlanning on building the next Twitter, Facebook, or Flickr? Forget what you know about the LAMP stack, SQL-based databases, and web hosting. The building blocks for the modern web app are independent, shared-nothing, infinitely scaleable, and cloud ready. This is no longer the way of the future, it’s the way of right now.

Perimeter

No matter what type of application you are running, you are still going to want a firewall somewhere in the mix. It might be a good idea to put one (ok, ok, two for failover) at the perimeter of your network to block around 90% of malicious traffic. The firewall can also act as a translation point between public and private IP addresses, allowing you to build out your architecture in the filtered subnet. If you are running your application in a cloud service, this may not be as much of a concern as server colocation or hosting your own datacenter, but filtering traffic is still a necessity.

Once that’s out of the way, its time to start the real meat and potatoes of the stack. The first application your customers are going to hit is the load balancer. If you come from a traditional, old-school setup, you might be tempted to call F5 and order a BIG-IP. Don’t bother. Linux, NGINX, and commodity hardware will do the trick just fine. NGINX can also gracefully handle issues with the application servers by redirecting traffic to static HTML pages hosted on separate servers.

Logic

Avoid building your application using frameworks or dedicated application servers. Instead, focus on the language, and build your application to be completely independent of external dependencies, and unaware of the existence of additional application nodes. I think the chosen language matters less than the implementation, but if you are just getting started, and if you have history in Java, I would recommend Scala. Building “fat binaries” in Scala gives you a lot of flexibility during deployment, and it also simplifies the server hosting environment. Remember, simplicity is power, simplicity is your friend.

Data

Data storage is one of the most complicated issues in building a modern web application, but it is getting simpler as time goes on. In a LAMP stack, you would use MySQL or PostgreSQL as the database. Both applications work well, but they both run into issues when you start to scale up and out. Up as in your traffic starts to build, and out as in you need geographic separation. Instead, consider building your application data storage around MongoDB. MongoDb was built for the web and replicates easily, even across the WAN

Mind Set

The main concept to keep in mind is to avoid a single point of failure at any location in your application stack. Build two of everything in production, and automate everything with Chef or Puppet. Using these building blocks will not ensure that your application is perfect, but it will give you powerful tools to scale as the popularity of your site grows.

Thank God for open source. Can you imagine how hard this would be with tools from Microsoft?

Related Activities

Related Software

Related Blog Posts



src='http://ads.gigaom.com/show/rss/'
alt=''
border='0'
/>

View full post on OStatic blogs

  • Share/Bookmark

More from category

Boycott Linux, Fedora Beta a Go, and Drupal Yikes

internet advertising The top story tonight is a highly critical flaw in Drupal 7 that may have allowed a lot of [Read More]

DreamHost Takes its OpenStack IaaS Platform Out of Beta Tests

internet advertising DreamHost has now taken its DreamCompute infrastructure-as-a-service (IaaS) OpenStack cloud [Read More]

Canonical’s OpenStack Offerings to Change the Company’s Direction

internet advertising Canonical is drawing a lot of attention after unveiling its own Ubuntu OpenStack distribution, and [Read More]

A Good Puppy, Urban Legends, and Kubuntu Plasma 5

internet advertising While perusing the nighly newsfeeds the release of Puppy Linux 6.0 was mentioned. Jonathan Riddell [Read More]

The W3C Pronounces the HTML5 Standard Finalized

internet advertising Web and mobile developers have been leveraging the power of the HTML5 standard for several years [Read More]

Twitter On Me

<p>Error: Twitter did not respond. Please wait a few minutes and refresh this page.</p>

Calendar

October 2014
M T W T F S S
« Sep    
 12345
6789101112
13141516171819
20212223242526
2728293031