If you're encountering HTTP 523 errors when making direct requests to Algolia endpoints, it's likely due to an outdated DNS cache. By default, Algolia's client libraries automatically retry requests, so internal infrastructure updates shouldn't cause any issues.
However, if you've customized the client's retry behavior or are manually caching DNS results, this could lead to 523 errors. In this case, we recommend clearing your DNS cache or ensuring that your DNS resolution is kept up to date.
By default, the Java Virtual Machine (JVM) caches DNS lookups indefinitely. Since Algolia uses multiple IP addresses to distribute traffic (load balancing), this can lead to connectivity issues over time. To avoid this, we recommend setting a shorter Time To Live (TTL) for DNS caching. For example, you can configure it to refresh every 60 seconds:
java.security.Security.setProperty("networkaddress.cache.ttl", "60")