Crisp Reading Notes on Latest Technology Trends and Basics

Scalable Web-2.0 Architectures
These are pre-social Architectures

Web Architecture Components

  • Scalable External Cache
  • Scalable WebServer
  • Scalable Internal Cache
  • Scalable Application Servers
  • Scalable Database Servers
  • Scalable Miscellaneous Servers

Scalable External Cache


  • Caches outbound HTTP objects
    • Images, CSS, XML, etc
  • Defense against Denial of Service

How useful

  • A lot of traffic does not reach the WebServer.
  • Since the path to the cache from the WebServer is a high bandwidth path,
    • The proxy quickly gets the file, and frees the WebServer connection,
    • even though client may be slow

Typical Caches

  • Squid
  • Apache mod_proxy
  • A commercial HTTP Accelerator

System Configuration

  • Fast Network
  • Lots of memory
  • Moderate disk space
  • Low CPU

Scalable Web-Server


  1. Terminates HTTP or SSL connections
  2. Serves static content from disk
  3. Serves dynamic content
    • php, mod_perl, python, etc
  4. Dispatches request to Application Server

Typical Web Servers

  • Apache ( The “A” of LAMP )
  • thttp ( Trivial http – Very fast HTTP server )
  • IIS
  • Tux WebServer, Oracle WebServer

Hardware Requirement

  • Lots and lots of memory
    • Memory is the primary bottleneck in WebServers
    • Memory determines maximum number of users
  • Fast Network
  • CPU depends on Storage
    • Dynamic Content Serving requires high CPU
    • Static Content Serving requires only a slow CPU
  • Slow disk is adequate
    • Used to serve static content and code

Application Servers


  • If SSL terminated, requires SSL accelerator card.
  • Maintains Application view of data
  • Runs internal services
    • Search
    • Shopping Cart
    • Credit Card Processing


  • Receives RPC (SOAP or REST) calls from the Web layer
  • Communicates with Database layer and other services, and returns a response.

Typical App Servers

  • BEA Weblogic
  • IBM WebSphere

Hardware Requirements

  • Extremely memory hungry
    • 64-bit systems required
  • Lots of CPU – Multi-CPU systems required

Database Layer


  • Data Storage and Retrieval
  • Data Aggregation and Computing
  • Sorting
  • Filtering
  • Transaction (ACID properties)
  • Data Archival, Data Warehousing

Hardware Requirements

  • Depends on the application. Likely to be expensive
  • Lots of memory
  • Lots of disks – Spindles galore
    • RAID
  • CPU important for Data Computation
  • Redundancy – Dual Power Supply, Dual Network

Typical Databases

  • Oracle
  • MS-SQL
  • IBM-DB2
  • Postgres
  • MySQL

Internal Cache Tier


  • Object Cache
  • Caches of Applications and Web layers
  • Tuned for applications
  • Scales horizontally

Typical Examples

  • memcache
  • redis
  • LRU tables

Hardware Configuration

  • Lots of memory
  • Some hard-disk
  • Low CPU

Miscellaneous Services


  1. Mail
  2. DNS
  3. Time Synchronization
  4. System Monitoring
  5. Fault Notification

The Glue


  1. Load-Balancers
  2. Switches
  3. Firewalls
  4. Routers

Routers and Switches

  • Expensive
  • Complex
  • Crucial piece of the system

Performance Hints

  • Use GigE for performance
    • Use Jumbo Ethernet frames (1500 – 9000 bytes)
  • Use Vlans to handle complexity
  • Use Trunking, Bonding and Aggregation (LACP) for failover

Load Balancers

  • Balances the load on
    • HTTP Caches
    • HTTP Servers
    • App Servers
    • DB Servers
  • Need not use on items that auto-balance within themselves
    • DNS
    • LDAP
    • Memcache

Message Buses – Examples

  • JMS
  • MQ-Series
  • Tibco-Rendevous

Message Buses – Functionality

  • Robustness between different parts of the Distributed System
  • Guaranteed Delivery
  • Handles Unicast and Broadcast

Comments on: "Scalable Web-2.0 Architectures" (1)

  1. I think you’ll find scaling out with clusters running tomcat or resin more scalable than one big iron server running websphere. Also, consider XMPP instead of AJAX for a more scalable web 2.0 architecture. See as to why that is so.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Tag Cloud

%d bloggers like this: