Closed chunchiehdev closed 2 months ago
Can you please elaborate your use-case and explain the reason you want/need to run multiple replicas? At first sight, this doesn't look like a supported scenario.
Thank you for your response.
By running multiple replicas, I aim to ensure that the OPC PLC service remains available even if one or more Pods fail. Also distribute the client requests across different Pods to enhance performance.
Are there any best practices or solutions for synchronizing node values across multiple replicas in such a setup?
@chunchiehdev, the opc plc simulation opc ua server is designed to act like a standalone containerized application. It is not designed to run in a k8s cluster as a distributed architecture. If you spin multiple instances just do this using separate deployments with replica set always to 1. Increasing replica setting to more than 1 will just end up in un-predictable behavior of the multiple instances of the opc plc. They are completely unaware about any peers deployed in the same cluster and act as independent standalone applications.
Thank you for the detailed explanation. Now I understand.
This issue is for a: (mark with an
x
)I noticed that when I deploy
opcplc
to AKS and set the replica to 3, it will create three pods.However, when I subscribe to
opcplc
from client A with ns=1,s='temperature', value=25, there might be a log in pod1 indicating that someone has subscribed. Then, if I change the value to 30 for ns=1,s='temperature' from client B (I forward the pod2 to my localhost 4840), it might result in an "Error publishing." Also client A won't change the value.I suspect the reason is that I started 3 pods. When I set replicas to 1, everything works fine.
Minimal steps to reproduce
Any log messages given by the failure
Expected/desired behavior
OS and Version?
Versions
Mention any other details that might be useful