Sub topic 11
Gateway clusters and high availability
This chapter assumes you can install and register a standard-mode gateway, add a gateway data source, and map a dataset to it. It covers how a second gateway protects scheduled refresh from a single machine failing.
Why one gateway is a single point of failure
A dataset that refreshes through one gateway depends on that one machine. If the machine restarts, loses its network, or has its gateway service stopped, every scheduled refresh that uses it fails until someone fixes it. A gateway cluster removes that dependency.
What a cluster is
A gateway cluster is a group of gateway installations that act as one gateway in the Power BI service. The first gateway you register is the primary. Each gateway you add afterward is a secondary member of the same cluster. Data sources, credentials, and dataset mappings belong to the cluster, not to a single machine.
Only standard-mode gateways can join a cluster. Personal mode gateways cannot.
How requests are routed
By default, the service sends each request to the primary gateway. If the primary is offline, the service tries the next member in the list, and so on. The order of members is set when you add them, and the primary is always first.
You can change this behavior in the gateway cluster settings in the Power BI service. The option "Distribute requests across all active gateways in this cluster" spreads requests across members. This is load balancing, and it is off by default.
Adding a gateway to a cluster
- Install the gateway on a second machine.
- Sign in with the same account you used for the first gateway.
- Choose Add to an existing gateway cluster instead of registering a new gateway.
- Select the primary gateway from the list and enter the recovery key you set when you created it.
- Finish the setup and confirm the new member appears in the cluster in the service.
The recovery key is what ties a new member to the cluster. Keep it in a secure place, because you need it for this step and for recovery.
Keeping members consistent
Members of a cluster should run the same gateway version and have the same drivers and providers installed. If the primary has an ODBC driver that the secondary lacks, a failover can fail even though the gateway itself is healthy. Install and update all members together.
Place members on separate hosts, and where possible on separate hardware or virtualization hosts. Two gateways on the same physical server fail together.
What a cluster does not do
- It does not split one refresh across machines. Each refresh runs on one gateway.
- It does not protect against the data source going down.
- It does not remove the need to monitor refresh history. A failover can happen silently, so check which member handled a failed refresh.
Exercise
A cluster has a primary and one secondary. The primary goes offline, and scheduled refresh starts failing even though the secondary shows as online. What is the most likely cause, and how do you check it?
Show answer
The secondary probably cannot reach the data source, or it lacks a driver the primary has. Run Test-NetConnection from the secondary to the data source server and port, and compare installed drivers and gateway versions on both machines.
Exercise
Which setting changes a cluster from "use the primary, fall back when it is down" to spreading requests across members?
Show answer
Enable "Distribute requests across all active gateways in this cluster" in the cluster settings in the Power BI service.