18:07, EEST
August 20, 2014
Hi,
we have an opc ua client application developed with the prosys java sdk. Now we would like to support multiple network path redundancy with this client. We will have one opc ua server, which is reachable over two differen network interfaces. We would like to implement the faiover mechanism in our client application. Our question is, what would be the best way on the client side to support the failover to the other network path?
13:28, EEST
Moderators
February 11, 2020
Hello,
This is quite a complicated question and there is no simple solution to it.
You would need a separate UaClient instance for each network interface. You can either have all the UaClients to attempt to stay connected with the Server or only have one of them connected at any given time. The former approach would allow you to switch between UaClients faster while the latter approach consumes less Server resources.
Whenever your Client application interacts with the Server application via Services, the Client application should choose one of the UaClients to send the Service request to the Server with. For most Service requests, such as reading and writing Attribute Values, switching between UaClients shouldn’t be a problem. However, when switching between UaClients, you will need to use Subscription.transferTo method for transferring Subscriptions from one UaClient to another.
Do note that we have not experimented much with this scenario or attempted implementing this solution ourselves. If any issues arise, please contact us for assistance.
BR,
Matti
12:00, EEST
February 14, 2020
15:16, EEST
April 3, 2012
Hi,
Note that OPC UA is (outside of PubSub) Session based Client-Server architecture.
In general a load-balancer should work (for load-balancing), assuming the connections of a single source are always routed to the same server instance (for example during connection, the UaClient will make 2 connections sequentially for GetEndpoints and then the actual connection). And as said, we have not experimented with this much (probably will do, but in general there is _a lot_ of things to do).
In this case assuming your case would be similar to the original post, meaning a single server instace, it should work (depending on things you might lose data from the period the switching happens), since this should be effectively the same thing as a short network connection break (that we do test). But we have not tested this exact scenario (that I personally remember at least now), so please do test yourself before trying in production.
18:31, EEST
February 14, 2020
16:46, EEST
Moderators
February 11, 2020
You can use UaClient.setKeepSubscriptions(false) to allow the Server to remove Subscription when the Client disconnects. However, Subscriptions won’t be removed if the connection between the Client and the Server is lost for any other reason.
You can transfer Subscriptions between Clients with Subscription.transferTo(UaClient) method to avoid creating duplicate Subscriptions on the Server.
Most Users Ever Online: 1919
Currently Online:
24 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Heikki Tahvanainen: 402
hbrackel: 144
rocket science: 88
pramanj: 86
Francesco Zambon: 83
Ibrahim: 78
Sabari: 62
kapsl: 57
gjevremovic: 49
Xavier: 43
Member Stats:
Guest Posters: 0
Members: 727
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1529
Posts: 6471
Newest Members:
kourtneyquisenbe, ellis87832073466, zkxwilliemae, gabriellabachus, Deakin, KTP25Zof, Wojciech Kubala, efrennowell431, wilfredostuart, caitlynfajardoModerators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1032, Jimmy Ni: 26, Matti Siponen: 349, Lusetti: 0
Administrators: admin: 1