# Using system.util.sendRequest with Redundant Gateways (Master/Backup)

**URL:** <https://forum.inductiveautomation.com/t/using-system-util-sendrequest-with-redundant-gateways-master-backup/111154>\
**Category:** Ignition\
**Tags:** ignition81, scripting\
**Created:** [October 2, 2025, 10:57am UTC](https://forum.inductiveautomation.com/t/using-system-util-sendrequest-with-redundant-gateways-master-backup/111154 "2025-10-02T10:57:44Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gaurav.Shitole](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/gaurav.shitole/32/72050_2.png) [@Gaurav.Shitole](https://forum.inductiveautomation.com/u/Gaurav.Shitole)\
**Post date:** [October 2, 2025, 10:57am UTC](https://forum.inductiveautomation.com/t/using-system-util-sendrequest-with-redundant-gateways-master-backup/111154/1 "2025-10-02T10:57:44Z")

</div>

Hi all,

I’m using the following function to send a message from an Edge Ignition gateway to a central Ignition gateway:

```python
ack = system.util.sendRequest(
    project=project,
    messageHandler=globalMessage,
    payload=payload,
    remoteServer=gwName,
    timeout=15000
)

```

This works fine when the master gateway is up. But since the central has redundancy enabled, I’m wondering what happens when the master goes down.

- Does `sendRequest` automatically fail over to the backup gateway, or do I need to handle that explicitly?

- I tried enabling Request Failover on backup and calling the message, but I received this error:

```python
com.inductiveautomation.ignition.client.gateway_interface.GatewayException: 
com.inductiveautomation.ignition.client.gateway_interface.GatewayException: 
TimeoutExpiredException[queueId=scriptMsgQueue, targetIntent=PLATFORM_SCRIPT_REQ, 
msgData=com.inductiveautomation.ignition.gateway.clientcomm.scriptmsg.RemoteScriptMsg@4550dcf5]

```

So I’m not sure:

- Where is this message being queued?

- Will it automatically retry when the master/connection is restored?

- Or is there a way to explicitly send the request to the backup gateway?

Any advice or best practices for handling redundancy with `system.util.sendRequest` would be really helpful.

Thanks!

---

<div class="post-metadata">

**Author:** ![Daniel\_Kearney](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/daniel_kearney/32/79526_2.png) [@Daniel\_Kearney](https://forum.inductiveautomation.com/u/Daniel_Kearney)\
**Post date:** [October 2, 2025, 11:14am UTC](https://forum.inductiveautomation.com/t/using-system-util-sendrequest-with-redundant-gateways-master-backup/111154/2 "2025-10-02T11:14:49Z")

</div>

You could try using `system.util.sendRequestAsync` instead for your messaging which would allow you to do some error handling if you encounter any issues with failovers. If you receive an error, you could specifically target the backup gateway in your script (or something else useful).

> **[system.util.sendRequestAsync | Ignition User Manual](https://docs.inductiveautomation.com/docs/8.1/appendix/scripting-functions/system-util/system-util-sendRequestAsync)**
>
> This function sends a message to the Gateway and expects a response.

---

<div class="post-metadata">

**Author:** ![Gaurav.Shitole](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/gaurav.shitole/32/72050_2.png) [@Gaurav.Shitole](https://forum.inductiveautomation.com/u/Gaurav.Shitole)\
**Post date:** [October 2, 2025, 11:30am UTC](https://forum.inductiveautomation.com/t/using-system-util-sendrequest-with-redundant-gateways-master-backup/111154/3 "2025-10-02T11:30:09Z")

</div>

Hi Daniel,

thanks for response. OK I will use async one and I am confused what will be remoteServer name in this case? Because Backup node has same name as Master.

I also tried adding 0:0 & 0:1, it didn’t work

---

<div class="post-metadata">

**Author:** ![mgross](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mgross/32/3311_2.png) [@mgross](https://forum.inductiveautomation.com/u/mgross)\
**Post date:** [October 2, 2025, 3:22pm UTC](https://forum.inductiveautomation.com/t/using-system-util-sendrequest-with-redundant-gateways-master-backup/111154/4 "2025-10-02T15:22:15Z")

</div>

The way the remote ids work is that if you just specify the remote gateway name without any `_0:0` or `_0:1` in front of it, is that the message routing system will route to whichever redundant gateway is active. If the redundant master gateway goes down, the local gateway is aware of this and will automatically reroute the message to the redundant backup gateway. (note that an address like `_0:0:mygateway` means that you are sending the message to either an independent gateway OR the currently active redundant gateway). You _could_ route the message directly to the redundant master gateway using an address like `_0:1:mygateway`, or to the backup gateway using `_0:2:mygateway`. But if that gateway isn’t active, the message handler won’t respond anyway.

---

<div class="post-metadata">

**Author:** ![Gaurav.Shitole](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/gaurav.shitole/32/72050_2.png) [@Gaurav.Shitole](https://forum.inductiveautomation.com/u/Gaurav.Shitole)\
**Post date:** [October 3, 2025, 12:31am UTC](https://forum.inductiveautomation.com/t/using-system-util-sendrequest-with-redundant-gateways-master-backup/111154/5 "2025-10-03T00:31:09Z")

</div>

Hello the error I posted above was throwing when I used Remote Gateway Name without 0:1 & 0:2.

That’s what i too imagined that it would just work even though backup server is Master now but it didn’t. Because it wasn’t working hence I tried with 0:0 but that too failed anyway returning no gateway found or project not found something.

---

<div class="post-metadata">

**Author:** ![mgross](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mgross/32/3311_2.png) [@mgross](https://forum.inductiveautomation.com/u/mgross)\
**Post date:** [October 3, 2025, 3:31pm UTC](https://forum.inductiveautomation.com/t/using-system-util-sendrequest-with-redundant-gateways-master-backup/111154/6 "2025-10-03T15:31:27Z")

</div>

TimeoutExpiredException indicates that the message never made it to the remote gateway. Can you confirm that the remote gateway is available? You should be able to use the gateway network diagnostics page on the gateway to test for connectivity to the remote gateway.

---

<div class="post-metadata">

**Author:** ![Gaurav.Shitole](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/gaurav.shitole/32/72050_2.png) [@Gaurav.Shitole](https://forum.inductiveautomation.com/u/Gaurav.Shitole)\
**Post date:** [October 5, 2025, 10:08pm UTC](https://forum.inductiveautomation.com/t/using-system-util-sendrequest-with-redundant-gateways-master-backup/111154/7 "2025-10-05T22:08:59Z")

</div>

Yes I see the remote gateway is available and can even access the gateway (from web browser) to see logs.

---

<div class="post-metadata">

**Author:** ![Gaurav.Shitole](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/gaurav.shitole/32/72050_2.png) [@Gaurav.Shitole](https://forum.inductiveautomation.com/u/Gaurav.Shitole)\
**Post date:** [October 6, 2025, 1:03pm UTC](https://forum.inductiveautomation.com/t/using-system-util-sendrequest-with-redundant-gateways-master-backup/111154/8 "2025-10-06T13:03:28Z")

</div>

Just for reference:

I was missing Outgoing connection from Edge to Backup gateway hence it was failing. Following post helped:

[Ignition Edge Gateway network setting on Redundancy - Ignition - Inductive Automation Forum](https://forum.inductiveautomation.com/t/ignition-edge-gateway-network-setting-on-redundancy/100033)
