]>
Commit | Line | Data |
---|---|---|
8b651fb3 | 1 | /** |
2 | \page 10_DelayPools Delay Pools | |
3 | ||
4 | \section Introduction Introduction | |
5 | \par | |
6 | A DelayPool is a Composite used to manage bandwidth for any request | |
7 | assigned to the pool by an access expression. DelayId's are a used | |
8 | to manage the bandwith on a given request, whereas a DelayPool | |
9 | manages the bandwidth availability and assigned DelayId's. | |
10 | ||
11 | \section ExtendingDelayPools Extending Delay Pools | |
12 | \par | |
13 | A CompositePoolNode is the base type for all members of a DelayPool. | |
14 | Any child must implement the RefCounting primitives, as well as five | |
15 | delay pool functions: | |
16 | \li stats() - provide cachemanager statistics for itself. | |
17 | \li dump() - generate squid.conf syntax for the current configuration of the item. | |
18 | \li update() - allocate more bandwith to all buckets in the item. | |
19 | \li parse() - accept squid.conf syntax for the item, and configure for use appropriately. | |
20 | \li id() - return a DelayId entry for the current item. | |
21 | ||
22 | \par | |
23 | A DelayIdComposite is the base type for all delay Id's. Concrete | |
24 | Delay Id's must implement the refcounting primitives, as well as two | |
25 | delay id functions: | |
26 | \li bytesWanted() - return the largest amount of bytes that this delay id allows by policy. | |
27 | \li bytesIn() - record the use of bandwidth by the request(s) that this delayId is monitoring. | |
28 | ||
29 | \par | |
30 | Composite creation is currently under design review, so see the | |
31 | DelayPool class and follow the parse() code path for details. | |
32 | ||
33 | \section NeatExtensions Neat things that could be done. | |
34 | \par | |
35 | With the composite structure, some neat things have become possible. | |
36 | For instance: | |
37 | ||
38 | \par Dynamically defined pool arrangements. | |
39 | For instance an aggregate (class 1) combined with the per-class-C-net tracking of a | |
40 | class 3 pool, without the individual host tracking. This differs | |
41 | from a class 3 pool with -1/-1 in the host bucket, because no memory | |
42 | or cpu would be used on hosts, whereas with a class 3 pool, they are | |
43 | allocated and used. | |
44 | ||
45 | \par Per request bandwidth limits. | |
46 | A delayId that contains it's own bucket could limit each request | |
47 | independently to a given policy, with no aggregate restrictions. | |
48 | ||
49 | */ |