Prev | Current Page 471 | Next

Brad Ediger

"Advanced Rails"


Compression
If HTTPcompression is to be used, the front end web server can handle this to
reduce CPU load on the application servers.
SSL wrapping
The front end server can handle SSL encryption so that the application server
does not have to do it (SSL encryption and decryption are CPU hogs). The front
end server usually adds a header such as X-Forwarded_Proto: https to indicate
that SSL was used.
Common choices for a front end web server and proxy balancer are as follows.
Figure 10-7. Shared-nothing deployment with redundancy for load balancing or high availability
Web server/
load balancer
Application
server
Application
server
Application
server
More application
servers as
needed
DB
Internet
Web server/
load balancer
Optional
failover
318 | Chapter 10: Large Projects
Apache (http://httpd.apache.org)
Of these servers, Apache is definitely the heaviest. Administrators who have a
choice usually select one of the lighter options. But Apache has some advantages:
it is well-known and relatively easy to configure, it is very flexible, and it
integrates well with its environment.
If you have a choice, use Apache 2.1 or higher, as it supports mod_proxy_
balancer. Otherwise, you will need to proxy to a balancer such as pen or pound
in order to load balance between application servers.
Apache can actually directly serve Rails applications over FastCGI, using mod_
fastcgi and the Rails FastCGI dispatcher.


Pages:
459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483