Update the database during runtime
Use the NetAcuity Update feature to keep the contents of the geolocation database current. This allows you to keep multiple HAProxy Enterprise nodes synced with the latest data.
Install a web server of your choice and host the database file at a URL where HAProxy Enterprise can access. For example, host the files at
http://192.168.122.1:8000/netacuity.tar.gz
. We recommend that you host the unzipped file directory at this URL.-
Add the following lines to the
global
section of your configuration file, where the URL hosts an updated version of the file:global # ... other global settings netacuity-update url
04 http://192.168.122.1:8000/netacuity.tar.gz delay 24h timeout 100ms retries 3 checksum hash log
With this configuration, HAProxy Enterprise downloads the database every 24 hours and displays a message in the logs when it succeeds or if it encountered errors during the update.
netacuity-update
The netacuity-update
directive enables updating the database over HTTP from a specified URL. Updating a database with a newer version invalidates any cached lookups (if using cache), unless you enable the checksum setting and the new and old database contents are identical.
The directive supports the following syntax:
netacuity-update url <feature_code url>
[delay <u> | xdelay <u s b r>]
[timeout <t>]
[retries <n>]
[checksum]
[hash]
[log]
[dontlog-normal]
[param\*]
where:
| Required. Specifies URL for the database update. We recommend that you host the unzipped file directory at this URL. The feature code depends on the type of database. For example, if you name your NetAcuity files |
|
|
|
|
| Specifies the HTTP connection timeout for attempts to download a new database version. The value is in milliseconds by default, but you can set it to any other unit if you add it as a suffix to the number. Default: 5s. |
| Specifies the number of retries to download a new NetAcuity database version. If unspecified, the global |
| If present, determines the use of the SHA1 control sum to verify that the content of the recently downloaded database is identical to the one already used. If they are identical, the module does not do a live-reload of the database, thereby preserving cache contents (if you use caching). |
| If present, enables authentication of downloaded data. Each upgraded file must have the associated file with a SHA1 check The SHA1 checksum file has the extension |
| Specifies whether to log operation errors. |
| Deactivates logging for successful updates. |
| Lists other server parameters; useful to configure special SSL features. |
Next up
NetAcuity API Reference