Configuring failover endpoint in Azure AI search datasource, for a multi region Azure SQL managed instance database

karthik p 0 Reputation points Microsoft Employee
2026-04-23T06:08:59.4366667+00:00

Hi we have the following database configuration We are using Azure SQL Managed Instance where we have 2 database instances

  1. 1 in NCUS region
  2. Other in SCUS region

Now one of them acts as primary and other acts as secondary.

We also have enabled CDC in few tables that we populate to Azure AI search. Currently we have the following datasource configuration,

  1. Datsource_ncus -> reads from the CDC table NCUS region
  2. Datasource_scus -> reads from the CDC table in SCUS region

We also have configured indexers the following way

  1. Indexer_ncus -> uses the datasource_ncus and populates the index_1
  2. Indexer_scus -> uses the datasource_scus and populates the index_1

Now since only 1 database can be primary, for example here lets say NCUS is primary, the indexer of SCUS keeps failing (which we allow to fail) We also have configured failover endpoint for the above 2 database instance, so they are part of a failover group What i want to understand is, if we can use this failover endpoint, instead of having a seperate datasource and indexer for the database in 1 region.  

By doing that, we avoid having multiple indexers and datasources. We will just have 1 datasource and 1 indexer, and datasource would always resolve to the primary instance.

Can you please help in how i can configure this? There seems to be no documentation available

Azure AI Search
Azure AI Search

An Azure search service with built-in artificial intelligence capabilities that enrich information to help identify and explore relevant content at scale.


2 answers

Sort by: Oldest
  1. Pilladi Padma Sai Manisha 11,715 Reputation points Microsoft External Staff Moderator
    2026-04-30T15:16:17.4933333+00:00

    Hi Karthik,

    Thanks for sharing the detailed setup and the troubleshooting you’ve already done, that really helps narrow things down.

    What you’re trying to achieve (using the failover listener as a single datasource endpoint so that it always resolves to the current primary) is a valid design in general. However, in this specific case with Azure SQL Managed Instance and Azure AI Search, the limitation you’re hitting is due to networking rather than datasource configuration.

    The failover listener for Managed Instance is exposed within a VNet context and follows VNet-level access rules. Services like Azure Functions can connect successfully because they are either VNet-integrated or deployed within the same network boundary. Azure AI Search, on the other hand, runs outside of your VNet unless explicitly configured otherwise, and it does not have native support to reach the Managed Instance failover listener endpoint in this scenario.

    From the behavior you observed, where the public endpoint on port 3342 works but the listener endpoint does not — this confirms that the issue is network reachability and not related to how the datasource or indexer is defined. Even if both services are in the same subscription, network access is not implicitly shared, which is why the function works while the indexer fails.

    Given this, using the failover endpoint as a single datasource for Azure AI Search is not a supported or reliable approach with Managed Instance today. The current design with separate datasources and indexers per region is the correct and stable pattern in this setup.

    To address the failover gap you mentioned (where indexers need to be manually triggered), a practical solution is to automate this step. You can use an Azure Function or automation workflow that detects or is triggered during failover and then runs the appropriate indexer corresponding to the new primary region. This ensures your index remains up to date without manual intervention.

    I understand this adds some operational overhead, but given the networking constraints with Managed Instance, this is the most reliable approach at the moment.

    If you’d like, I can also help you design a simple automation flow for triggering the correct indexer during failover.

    Was this answer helpful?

    0 comments No comments

  2. Josh Wright 0 Reputation points
    2026-11-10T16:49:35.1366667+00:00

    Tested this with Failover Groups on SQL and Managed Identity: https://joshwright10.github.io/posts/azure-ai-search-managed-identity-sql-failover-groups/

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.