Guides / Scaling

Distributed Search Network (DSN)

Algolia’s Distributed Search Network (DSN) adds one or more additional servers to your cluster closer to your user base. Adding a DSN has these benefits:

  • Faster search. Because DSN servers are geographically closer to your users, there’s less network latency which leads to faster searches.
  • Increased capacity. DSN adds processing power to your search cluster. Adding DSN servers in the same region as your main cluster can help with handling peak usage periods more efficiently.

DSN servers are available as an optional extension to your existing pricing plan.

DSN server redundancy

DSN servers are bare-metal machines that operate independently and duplicate your cluster’s complete dataset and configurations. While they don’t provide cluster-level redundancy, they’re reliable when using official API clients as they automatically revert to the cluster if a DSN server encounters issues.

How DSN works

DSN servers aren’t backups. They’re an independent duplicate of your cluster’s data and configurations

After the cluster finalizes its indexing tasks (having reached consensus), it transmits this data to the DSN servers, which then carry out the same indexing process. Depending on the size of the job, updates to a DSN server might experience delays ranging from seconds to minutes.

DSN activation process

After upgrading, Algolia initiates the distribution and synchronization of your data to your DSN servers.

You can check your DSN servers from the Algolia dashboard.

Retries and fallback logic

Algolia’s official API clients select the nearest server (either DSN or cluster) for search requests.

If a request fails, the client follows this retry strategy:

  1. Attempts to connect to the cluster using one of its three server URLs
  2. On failure, tries another cluster URL
  3. On failure, uses the third cluster URL
  4. On failure, reports a timeout error.

Accessing DSN servers

Algolia’s DSN infrastructure, which hosts your data, is accessible through five URLs:

  • Smart records (NS1)
    • Finds the closest server (cluster or DSN)
    • Used for indexing.
  • Fallback records (Cloudflare) point to specific availability zones within the cluster:
Did you find this page helpful?