5. Proxycache by WAPT WAPT Enterprise feature WAPT Enterprise feature

5.1. Introduction

ProxyCache is a WAPT feature designed to replace the legacy secondary proxycache mirror system. It downloads and caches packages on-demand from the primary WAPT server, improving efficiency and reducing unnecessary data synchronization.

ProxyCache offers several key advantages, but also introduces some considerations.

Advantages

Considerations

Bandwidth optimization: Only requested packages are downloaded, reducing unnecessary data transfer.

Initial latency: The first download of a package may be slower as it fetches from the primary server.

Disk space efficiency: Unused packages are not stored, and automatic cleanup frees up space.

Network dependency: Requires reliable connectivity to the primary WAPT server for uncached packages.

Concurrent downloads: Supports multiple simultaneous downloads, eliminating synchronization delays.

Configuration: Requires proper setup for optimal performance, especially in large environments.

TFTP integration: Includes a built-in TFTP server that benefits from the same caching mechanism.

Migration needed: Secondary proxycache mirrors are deprecated and will be removed in WAPT 2.7.1.

5.2. How Proxycache Works

5.2.1. Basic Principle

ProxyCache replaces the legacy secondary proxycache mirror system by downloading and caching packages on-demand from the primary WAPT server.

It ensures that only necessary packages are stored and served locally, optimizing bandwidth and disk space usage.

Activation: ProxyCache is enabled on a dedicated server or machine acting as a cache proxy.

On-Demand Download: When a client requests a package, ProxyCache checks its local cache. If the package is not available, it downloads it from the primary WAPT server.

Local Caching: The downloaded package is stored locally in the ProxyCache directory. Subsequent requests for the same package are served directly from the cache.

Automatic Updates: If the package on the primary server changes, ProxyCache re-downloads it to ensure clients always receive the latest version.

Cleanup Mechanism: Unused packages are automatically removed after a configurable period to free up disk space.

5.2.1.1. proxycache location on the WAPT Agent Proxycache

Operating System

Value

Linux

/var/cache/wapt/proxycache

Windows

C:\wapt\cache\proxycache

5.2.1.2. Example of Operation:

Package unkrown by the Proxycache

Package already krown by the Proxycache

A client requests the vlc package. ProxyCache does not have it in its cache, so it downloads the package from the primary WAPT server. Then stores it locally, and serves it to the client.

Another client requests the same vlc package. ProxyCache finds the file in its local cache and serves it directly, without contacting the primary server.

Note

Integration with TFTP

ProxyCache includes a built-in TFTP server that follows the same on-demand caching principle, ensuring efficient distribution of files required for PXE boot or other TFTP-based operations.

5.3. Setting Up Proxycache

1- download package tis-proxycache on the wapt store https://wapt.tranquil.it/store/fr/tis-proxycache or by the waptconsole.

On the waptconsole Package inventory → Import from proxycache → search proxycache → Import the package

2- install on the pacakge in dependancy on a desired machines or on a OU ( united organisation)

In the inventory select the machine → do a right-click → Edit hosts → select the proxycache package → add dependencies to package → and Save

In the inventory select the OU → Create or Edit Organizational Unit Package → select the proxycache → add dependencies to package → and Build Upload

3- Do few specific rules to target some proxycache for few machines.

Create your specific rule: Go to this part

4- Configuration is complete and everything is up and running.

5.3.1. Default Cache Configuration

By default, the WaptProxyCache package deploys with a pre-configured set of parameters in the conf.ini.

Notably, cached packages are retained for 60 days by default, as defined by the TimeoutSec parameter (5184000 seconds) in the [http_settings.DiskCache] section, as well as in each individual URL section ([http_settings.Url#X]):

[http_settings.DiskCache]
TimeoutSec=5184000

[http_settings.Url#X]
DiskCache.TimeoutSec=5184000

In addition, the disk cache size is unlimited by default (MaxSizeKB=-1), meaning no upper bound is enforced on the total amount of data stored locally.

Bandwidth throttling can also be configured to limit the network impact of the proxy cache on the local infrastructure.

As the ProxyCache agent is designed to retrieve and store a potentially large number of packages over time, and given the unlimited cache size combined with a 60-day retention period, administrators should ensure that sufficient disk space is allocated on the host machine and monitored regularly to avoid disk saturation.

5.3.2. Presentation of Rules

Rules are essential for providing hosts with information about where to retrieve new packages. To use this feature, hosts must have the use_repo_rule parameter enabled.

Warning

The rules are applied from top to bottom.

The first rule that matches the conditions overrides all the other rules placed under.

5.3.2.1. How to adding a proxycache rule

To add a new proxycache rule, go to the Secondary repos tab in the WAPT Console and click on the Add rule button.

Options for proxycache rules

Options

Example value

Description

Name

repo25

Defines the name for the proxycache rule.

Condition

AGENT IP

Defines the condition to match for the proxycache rule to apply (see above).

Value

192.168.25.0/24

Defines the value when the condition applies. If NOT is checked, the value applies to the reverse of the condition.

proxycache URL

https://proxycache1.mydomain.lan

Defines the list of available remote proxycache. The list includes http://download.windowsupdate.com/microsoftupdate/v6/wsusscan/ to allow directly downloading of Windows Updates by the remote repositories to preserve WAPT Server bandwidth. If your certificate is self-signed, continue to use HTTP.

Package type

WAPT

Defines what types of packages are replicated.

Other

No fallbacks

The option No Fallback will prevent from falling back to the main WAPT Server and will avoid undesired network congestion if the remote proxycache becomes temporarily unavailable.

  • The option Proxy will need to be set if the remote proxycache is required to connect via a proxy.

Window for setting proxycache rules in the WAPT Console

Window for setting proxycache rules in the WAPT Console

You can then choose from the different above parameters and affect values to a specific secondary WAPT proxycache.