Portworx volumes and replicas


We have the following requirements:

  • read the data from the same node, where the initial request is so that there is no networking hop is happening to another node
  • have the same data in all the nodes so that every node could read the same volume for distributed data aggregation possibilities

Could You, please, advise the setup we might use for the Portworx?

We found that we might use the Stork to run the Portworx in the hyper-converged mode so that the Application would be deployed on the node where the Portworx Data disk is mounted.

Option 1
We might use the StatefulSet deployment scheme and then we would have the Volume per StatefulSet replica. So that the data would be available on all the nodes we need to have a Portworx replication count equal to StatefulSet replicas count and then the data would be replicated on all the disks and available from all the nodes.

We don’t know how to read the data out of the Portworx Read replica. We might only work with the Volume mounted to the StatefulSet replica and other replicas data is on this disk, but is not available as I see.

Option 2
Use Portworx Shared disk. With this option, every StatefulSet replica would be able to read the same data.

Networking Hop might happen and it seems that in this mode RWM (Read Write Many) there should be some bottleneck in terms of Writing and the latency should be higher than in Option 1.

Can you, please, advise with the setup and either confirm or deny the statements we have provided.

As you already mentioned, stork will take care of the hyper-convergence so that the app pod will be placed near the respective PVC on the cluster to avoid any network overhead.

As long as you don’t want to mount the same volume to multiple application pods and simultaneous (concurrent or shared) access to a volume from multiple hosts at the same time. You don’t need to use the shared volume. if you need more info on the shared volumes, check this docs pages. Shared and Sharedv4 Volumes
Create sharedv4 PVCs

If you are using multiple replications with the statefulset, you should be fine.

I hope, I clarified and confirmed your queries as per your request…