php_mysql_apache [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

php_mysql_apache [Electronic resources] - نسخه متنی

Julie C. Meloni

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید







Q&A


Q1:

How can I measure whether my site is fast enough?


A1:

Many developers test their sites locally or over an internal network, but if you run a public Web site, chances are good that many of your users will access it over slow links. Try navigating your Web site from a dialup account and make sure that your pages load fast enough, with the rule of thumb being that pages should load in less than three seconds.

Q2:

How can I migrate an existing name-based virtual host to its own machine while maintaining continuous service?


A2:

If a virtual host is destined to move to a neighboring machine, which by definition cannot have the same IP address, there are some extra measures to take. A common practice is to do something like the following, although many variations on these steps are possible:


  1. Set the time-to-live (TTL) of the DNS mapping to a very low number. This increases the frequency of client lookups of the hostname.

  2. Configure an IP alias on the old host with the new IP address.

  3. Configure the virtual host's content to be served by both name- and IP-address-based virtual hosts.

  4. After all the requests for the virtual host at the old IP address diminish (due to DNS caches expiring their old lookups), the server can be migrated.

Q3:

Can I mix IP- and name-based virtual hosting?


A3:

Yes. If multiple IP addresses are bound, you can allocate their usage a number of different ways. A family of name-based virtual hosts might be associated with each; just use a separate NameVirtualHost directive for each IP. One IP might be dedicated as an IP-based virtual host for SSL, for instance, whereas another might be dedicated to a family of name-based virtual hosts.

Quiz


1:

Name some Apache settings that might limit scalability or affect Apache performance.

2:

Name some operating system settings that might limit scalability.

3:

Name some approaches to improve performance.

4:

Which VirtualHost container gets a request if the connection uses NameVirtualHost, but no Host header is sent?

5:

Is the ServerName directive necessary in a VirtualHost container?

Answers

A1:

Some of the Apache settings that might affect scalability include FollowSymLinks, SymLinksIfOwnerMatch arguments to the Options directive, enabling per-directory configuration files, hostname lookups, having a scoreboard file, and statistics collection with mod_status.

A2:

Some operating system settings that might affect scalability include limits for number of processes, open file descriptors, and memory allowed per process.

A3:

The following are some suggestions for improving performance: load distribution via a hardware load balancer or reverse proxy, data compression, caching, mapping files to memory, and compiling modules statically.

A4:

Reading the configuration top-to-bottom, the first VirtualHost container is favored. The same behavior occurs if there is a Host header, but no VirtualHost container that matches it.

A5:

Only when name-based virtual hosts are used. The Host header contents are compared to the contents of the ServerName directive. If a match isn't satisfied, the VirtualHost containers' ServerAlias directive value(s) are checked for matches.


/ 323