Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
OPC UA Redundancy Multiple Network Paths
June 17, 2020
18:07, EEST
Avatar
Ibrahim
Member
Members
Forum Posts: 78
Member Since:
August 20, 2014
sp_UserOfflineSmall Offline

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?

June 18, 2020
13:28, EEST
Avatar
Matti Siponen
Moderator
Members

Moderators
Forum Posts: 349
Member Since:
February 11, 2020
sp_UserOfflineSmall Offline

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

August 11, 2020
12:00, EEST
Avatar
Oleksandr
Member
Members
Forum Posts: 34
Member Since:
February 14, 2020
sp_UserOfflineSmall Offline

Hello, can i solve this problem with load balancer (proxy). For example with haproxy?

August 13, 2020
15:16, EEST
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 1032
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

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.

August 21, 2020
18:31, EEST
Avatar
Oleksandr
Member
Members
Forum Posts: 34
Member Since:
February 14, 2020
sp_UserOfflineSmall Offline

Hi,

Regarding the problem of Multiple Network Paths, is there a possibility to stop a subscription on the client side when the connection to the server is gone?

August 24, 2020
16:46, EEST
Avatar
Matti Siponen
Moderator
Members

Moderators
Forum Posts: 349
Member Since:
February 11, 2020
sp_UserOfflineSmall Offline

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.

Forum Timezone: Europe/Helsinki

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, caitlynfajardo

Moderators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1032, Jimmy Ni: 26, Matti Siponen: 349, Lusetti: 0

Administrators: admin: 1