# Web Dev module during redundancy failover

**URL:** <https://forum.inductiveautomation.com/t/web-dev-module-during-redundancy-failover/89865>\
**Category:** Ignition\
**Tags:** redundancy, perspective, ignition81\
**Created:** [May 3, 2024, 2:23am UTC](https://forum.inductiveautomation.com/t/web-dev-module-during-redundancy-failover/89865 "2024-05-03T02:23:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bill.liu](https://avatars.discourse-cdn.com/v4/letter/b/9fc348/32.png) [@bill.liu](https://forum.inductiveautomation.com/u/bill.liu)\
**Post date:** [May 3, 2024, 2:23am UTC](https://forum.inductiveautomation.com/t/web-dev-module-during-redundancy-failover/89865/1 "2024-05-03T02:23:09Z")

</div>

I noticed the Web Dev module keeps functioning on both the master and backup gateways regardless of the redundancy activity level on either gateways.

What strategy should Web Dev clients use to decide which gateway to use?

Can I suggest the standby gateway should redirect the request to the active gateway like the perspective module does? Clients can detect that redirection occurred and decide to switch or stay on the same gateway address.

---

<div class="post-metadata">

**Author:** ![richardNZ15](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/richardnz15/32/33373_2.png) [@richardNZ15](https://forum.inductiveautomation.com/u/richardNZ15)\
**Post date:** [May 3, 2024, 2:46am UTC](https://forum.inductiveautomation.com/t/web-dev-module-during-redundancy-failover/89865/2 "2024-05-03T02:46:54Z")

</div>

Sounds like a bug in my mind.  
Redundancy module / code base should be sorting that out. Perhaps raise a support ticket if you haven't already and see what the devs think?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [May 3, 2024, 11:11am UTC](https://forum.inductiveautomation.com/t/web-dev-module-during-redundancy-failover/89865/3 "2024-05-03T11:11:01Z")

</div>

> [@richardNZ15](#):
>
> Sounds like a bug

I disagree. WebDev scripts run in the gateway, and therefore can interrogate the gateway context for redundancy conditions. And return their own redirects when needed.

The deficiency is the lack of documentation for this.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [May 3, 2024, 3:13pm UTC](https://forum.inductiveautomation.com/t/web-dev-module-during-redundancy-failover/89865/4 "2024-05-03T15:13:00Z")

</div>

It's _debatably_ an error for file/mounted folder handlers, but I definitely agree with Phil that it would be worse for us to _enforce_ that the backup can take no responsibility at a level you don't have access to.

In your Python handler, you could read the `[System]Gateway/Redundancy/IsMaster` (or any of the related tags) to determine the current status and decide whether you want to return a redirect, which should be as simple as:

```python
request["servletResponse"].sendRedirect("backupaddr")

```

---

<div class="post-metadata">

**Author:** ![bill.liu](https://avatars.discourse-cdn.com/v4/letter/b/9fc348/32.png) [@bill.liu](https://forum.inductiveautomation.com/u/bill.liu)\
**Post date:** [May 3, 2024, 9:53pm UTC](https://forum.inductiveautomation.com/t/web-dev-module-during-redundancy-failover/89865/5 "2024-05-03T21:53:04Z")

</div>

Thank you for all the comments. I will use [System]Gateway/Redundancy/\* to get information on the gateway redundancy status and react accordingly.
