Web Dev module during redundancy failover

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.

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?

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.

2 Likes

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:

request["servletResponse"].sendRedirect("backupaddr")
2 Likes

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