MySQL Router 9.7  /  Deploying MySQL Router  /  DNS/Host Cache

3.6 DNS/Host Cache

MySQL Router's DNS/Host cache improves connection-handling efficiency and reduces the overhead caused by repeated hostname resolution during frequent connect/disconnect cycles.

Host Cache Configuration

The Host Cache is enabled by default and can be configured in the [host_cache] section of the mysqlrouter.conf file. The following parameters can be configured:

For example:

[host_cache]
enabled = true
max_entries = 500
ttl_success_seconds = 120
ttl_negative_seconds = 30
ttl_jitter_ratio = 0.1

host_cache Observability

Observability is provided by the host_cache REST API. See host_cache.