| Article: |
The PHP Scalability Myth | |
| Subject: | Two-tier vs. three-tier | |
| Date: | 2003-10-17 12:12:03 | |
| From: | anonymous2 | |
|
To begin with, the author apparently doesn't understand the reasons behind three-tiered architecture. It has nothing to do with "code factoring". It has to do with scalability. Not performance. Scalability. They are completely different issues, especially in the context of complex business applications.
|
||
Showing messages 1 through 3 of 3.
-
Two-tier vs. three-tier
2003-12-12 09:11:13 anonymous2 [View]
-
Two-tier vs. three-tier
2003-10-17 12:39:26 anonymous2 [View]
Physically separating the tiers is more hurtful than helpful. If your web server and application are both sharing the same hardware, and your application needs more power but your web server doesn't, how will it hurt anything to simply run the combination on more servers? It won't. But it will cut down on the overhead of communicating with remote servers, which is very significant.
The only thing that matters is being able to run the CPU-bound section (or whatever the bottleneck is) on more hardware. The fact that the web server is now getting more power than it needs is not a problem.
-
Two-tier vs. three-tier
2003-10-17 12:18:50 anonymous2 [View]
A lot of the 'heat' being generated here appears to stem from the absence
of a good definition for "scalability" in the article. This is a common
problem.
Scalability is an abstact notion. So are terms like "reliability", and the
word "performance" itself. One person's meat is another's poison. With
regard to computer system performance, you might desire to optimize such
metrics as, throughput, response time, or resource utilization; to name a
few. The goal depends on the context. If you're printing reports at the end
of the financial year, MAXIMUM throughput is likely to be your goal. In
contrast, many web applications focus on MINIMIZING user response time.
Simply put, 'scalability' is a relation among variables (performance
metrics) that characterizes the rate of diminishing returns as the
dimensions of the system are increased. This means that scalability can
actually be expressed in a mathematical form. I've tried to illuminate this
point elsewhere http://www.perfdynamics.com/papers.html. Specifially,
http://www.teamquest.com/html/gunther/fitting.shtml and
http://xxx.lanl.gov/abs/cs.DC/0210017 should be of interest.
--Neil Gunther



Suppose an HTTP connection has been established between the client (e.g., browser) and the web server. That connection must remain open until the same web server generates a response. Also, even though information from the initial request may be is passed to another tier, the result of that information must be returned _back_ through the same web server for final processing before being returned to the client. During that time the web server must maintain all data structures necessary for the
- HTTP connection, and
- connection to the next tier (e.g., database connection).
This is where any scalability limitations apply.
It is better to maintain a redirector _ahead_ of the web servers. The purpose of this component is to redirect the request to the least-loaded web server.