HTTP(s) failover concepts for REST, OPC UA Server & WebManagement in OPC Router
What is failover?
This chapter deals exclusively with redundancy and automatic failover for HTTP(s)-based interfaces of OPC Router (REST API, integrated OPC UA Server, WebManagement interface). Different redundancy mechanisms apply to other plug-ins and protocols.
Failover ensures that requests are automatically redirected to another available server in the event of a server failure. A reverse proxy can perform health checks to check which endpoints are active.
Use case example for failover with OPC Router redundancy
Situation
The two OPC Routers of a redundancy pair provide the same REST endpoint.
Here are projects from the primary and secondary services.
Requirement
The REST endpoint should be reliably accessible at one address. Requests to this address should be forwarded to the active OPC Router of the redundancy pair.
Solution
A reverse proxy, e.g., Nginx, is configured so that requests to a specific address can be forwarded to both OPC Routers. Health checks are performed to determine which endpoint is currently active.
The following section discusses the configuration of a failover for an OPC Router redundancy pair with Nginx and Traefik.