HAProxy Enterprise Documentation 2.0r1

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.

  1. 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 We recommend that you host the unzipped file directory at this URL.

  2. Add the following lines to the global section of your configuration file, where the URL hosts an updated version of the file:

       # ... other global settings
       netacuity-update url 04 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.


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>]


url <feature_code url>

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 na_04_01.db, na_04_02.db, etc., then set the feature code to 04.

delay <u>

<u> specifies the period between each attempt to download a new database version. The delay is a simplified version of the xdelay keyword.

xdelay <u s b r>

xdelay settings are defined as follows:

  • <u> specifies the period between each attempt to download a new database version. Default: 5m

  • <s> specifies the initial (first) download delay. Default: 5s

  • <b> specifies the delay between the download of each element of the database. Default: 10s

  • If the download fails, <r> determines the delay for the next attempt. Default: 30s

If the new version of the database fails to download after three attempts, the module cancels the download until the next time interval specified by <u>. In this case, it discards the downloaded data.

timeout <t>

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.

retries <n>

Specifies the number of retries to download a new NetAcuity database version. If unspecified, the global retries value applies. Default: 3


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 .sha1. The typical way to create the SHA1 checksum file is: sha1sum file > file.sha1


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