Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Various updates.

...

I'm using Traffic Server on a speedy datacenter-grade connection.  As such, I've configured it to be somewhat pretty impatient in terms of timeouts.

Code Block
CONFIG proxy.config.http.keep_alive_no_activity_timeout_in INT 600
CONFIG proxy.config.http.keep_alive_no_activity_timeout_out INT 600
CONFIG proxy.config.http.transaction_no_activity_timeout_in INT 2010
CONFIG proxy.config.http.transaction_no_activity_timeout_out INT 2010
CONFIG proxy.config.http.transaction_active_timeout_in INT 43200
CONFIG proxy.config.http.transaction_active_timeout_out INT 43200
CONFIG proxy.config.http.accept_no_activity_timeout INT 2010
CONFIG proxy.config.net.default_inactivity_timeout INT 2010

Origin Server Connect Attempts

...

Code Block
CONFIG proxy.config.http.cache.cache_urls_that_look_dynamic INT 0
CONFIG proxy.config.http.chunking.size INT 128K
CONFIG proxy.config.http.server_session_sharing.match STRING host
CONFIG proxy.config.http.cache.ignore_server_no_cache INT 1

...

NOTE:  One should always double the setting for that configuration, as it allows "headroom" within Traffic Server such that one will never run out of slots in which to store objects.

Third, I 've explicitly tuned the average disk fragment setting as well as disabled a feature that for me slows down the cache a bit.

NOTE:  These settings require one to refresh the disk cache to take effect.  Simply remove /usr/local/var/trafficserver/cache.db and restart Traffic Server to refresh the disk cache.

Fourth, I discovered that backing off the cache directory's sync frequency helps populate the RAM cache under low load.  I definitely recommend trying this.

Code Block
CONFIG proxy.config.cache.ram_cache.size INT 128M32M
CONFIG proxy.config.cache.ram_cache_cutoff INT 16M4M
CONFIG proxy.config.cache.ram_cache.algorithm INT 1
CONFIG proxy.config.cache.min_average_object_size INT 64K
CONFIG proxy.config.cache.target_fragment_size INT 262144
CONFIG proxy.config.cache.mutex_retry_delay INT 50
CONFIG proxy.config.cache.enable_read_while_writer INT 0
CONFIG proxy.config.cache.dir.sync_frequency INT 1200900

Logging Configuration

The defaults for Traffic Server specify a squid-compatible logfile that's binary in nature.  I prefer to have the file readable so I'm overriding this.

...

Third, I also allow the cache to use stale DNS records for up to 5 15 minutes while they're being updated.  This also contributes to cache speed.

...

Code Block
##############################################################################
# HostDB
##############################################################################
CONFIG proxy.config.hostdb.ip_resolve STRING ipv6;ipv4
CONFIG proxy.config.hostdb.size INT 32K64K
CONFIG proxy.config.hostdb.storage_size INT 8M16M
CONFIG proxy.config.hostdb.serve_stale_for INT 900
CONFIG proxy.config.cache.hostdb.sync_frequency INT 900
CONFIG proxy.config.hostdb.timeout INT 30010080

Restart Traffic Server

Once you've updated the relevant records.config settings, simply refresh your disk cache if necessary and then restart Traffic Server.

...