61
Chapter 8
Configuring the cache
Partitioning the cache according to origin server or domain
After you have partitioned the cache according to size and protocol, you can assign the partitions you created
to specific origin servers and/or domains.
You can assign a partition to a single origin server or multiple origin servers. However, if a partition is assigned
to multiple origin servers, there is no guarantee on the space available in the partition for each origin server.
Content is stored in the partition according to popularity.
In addition to assigning partitions to specific origin servers and domains, you must assign a generic partition
to store content from all origin servers and domains that are not listed. This generic partition is also used if the
partitions for a particular origin server or domain become corrupt.
To partition the cache according to hostname and domain:
1. Configure the cache partitions according to size and protocol as described in
Creating cache partitions for
specific protocols‚ on page 60
.
You should create a separate partition based on protocol for each host and domain, and an additional
generic partition to use for content that does not belong to these origin servers or domains. For example, if
you want to separate content from two different origin servers, and you want the content to be separated
by protocol so that HTTP content and streaming media content is stored separately, you must have five
separate partitions. One HTTP-based partition for each origin server, one streaming media-based partition
for each origin server, and a generic partition for all other origin servers not listed (the partitions do not
have to be the same size).
2. Telnet into the HP web cache appliance and select Shell Access as described in
Overview of Access
Methods‚ on page 7
.
3. Open the
hosting.config
file located in Traffic Server’s
config
directory with Vi.
4. Enter a line in the file to allocate the partition(s) used for each origin server and/or domain. For an origin
server, the line must contain the following format:
hostname=hostname
partition=list_of_partition_numbers
For a domain, the line must contain the following format:
domain=domain_name
partition=list_of_partition_numbers
where:
hostname
is the fully qualified hostname of the origin server whose content you want to store on a
particular partition (for example,
www.hp.com
).
domain_name
is the domain whose content you want to store on a particular partition (for example,
hp.com
).
list_of_partition_numbers
is a comma-separated list of the partitions on which you want to store
the content that belongs to the origin servers or domains listed. The partition numbers must be valid
numbers listed in the
partition.config
file.
IMPORTANT
If you do not assign a generic partition, you will be unable to start Traffic Server.
NOTE
You do not need to stop Traffic Server before you assign partitions to particular hosts or
domains. However, this type of configuration can cause a spike in memory usage and is
time consuming. HP recommends that you configure partition assignment during
periods of low traffic.