pantsblazing:3-Tier Enterprise Web Architecture<<homeIntroductionThis document deals with generic cases of 3-tier Web architectures:
Tier 1: Static content
Its aim is to lay out a generic roadmap for a scaleable and
cost-effective architecture, with emphasis on generic - every
application is different and has different requirements. Your
needs and results may vary. And as always, TMTOWTDI (There's More
Than One Way To Do It).
Scope
This document covers physical architecture only. It does not cover
OS- or application-level tuning.
NotesAll phases only list changes from the previous phase.
In this model, Tiers 1 and 2 are laterally equivalent in that
requests to Application Server are not routed through Static Web
Servers; clients connect directly to each.
Disclaimer
This information is provided as a courtesy. It may or may not be
accurate and it may or may not work for you. Use at your own risk.
![]() Both application logic and static content (images, static HTML files, PDFs, etc.) reside on a single computer ("All-in-One Web Server"). The application connects to a database running on a different computer. Strengths:
Weaknesses:
![]() Additional All-in-One Web server clones are added for redundancy at tiers 1 and 2. The firewall becomes a firewall/load balancer (preferably two of them clustered for automatic failover) to distribute load between and provide transparent failover for the Web servers. If the application uses memory- or file-based session management, content- or session-aware load balancers are required to ensure that each session is directed to the computer that the session resides on. You may want to look into application servers that are capable of session failover.
One method of distributing cloned content to the Web servers is
Strengths:
Weaknesses:
![]() Application logic and static content are separated and put on different computers. This allows the computers to be specifically optimized for the content they are delivering. This should be done with a minimum of four computers serving tiers 1 and 2, two for each tier 1 and tier 2, maintaining redundancy for both. NOTE: If a lot of your traffic is over SSL, consider putting a dedicated hardware SSL device between the firewall/load balancer and the HTTP servers. It plays man-in-the-middle, talking SSL to the clients and unencrypted HTTP to the Web server. SSL uses large amounts of processor time and you can squeeze significantly more capacity out of your Web servers by offloading SSL processing to the dedicated device. Strengths:
Weaknesses:
![]() If you've reached this point, database load has or will shortly become an issue. If your application uses user accounts, user information from the database can be replicated to and retrieved from an LDAP server. This reduces load on the database, particularly in the case of authenticating a user, which typically results in the computationally expensive operation of a full table scan of the user table on a character column. LDAP servers can be replicated for increased capacity and redundancy. This is a good time to replicate (real-time or batch during low-load times) the production database to an off-line DSS (reporting) database on a separate machine and investigate a data warehousing strategy for data that needs to be kept but doesn't need to be in the live production database. Avoid running reporting queries againt the production database as they typically generate horrendous load. If you haven't been tuning your database from the beginning, it's a good time to start . Strengths:
Weaknesses:
![]() A standby database is added for redundancy. The primary database is replicated to the standby which will take over if the primary fails. Strengths:
Weaknesses:
![]() The master/slave databases are replaced with bi-directionally replicated and load-balanced databases. This is not trivial. For Oracle databases, see Quest Software's SharePlex. This can be simplified somewhat by having bi-directionally replicated but not load balanced purpose-specific databases. For example, the entire schema is kept on both machines, but your application queries product information from one database and user information from another. This allows for some replication latency, or, depending on your schema and application, batch-updates. Strengths:
Weaknesses:
|