Volumes - time to mount it

Hi everyone! :slight_smile:

I have a shiny app where a NFS is mounted every time the user visits the page because I want to keep/show some persistent data. Does anybody know how this mounting works? Example: if I have a huge NFS (a lot of folders inside it and 400GB in total), will the NFS mounting be slow? Will it increase the load time of my app?

I’m not very experienced with NFS volumes, so I don’t know how they are mounted and how fast the mount is when the NFS volume is big.

Note: I’m using AWS Elastic File System.

Thanks in advance,
Silvano

Hi Silvano,

I think that using some NFS is very similar to using volumes with docker containers. I have used NFS mounting on one shinyproxy installation on premise (with K8) but used file from mount was very small.
As your big folder is not inside container it should not increase starting time of your shiny app. And your connection between AWS Elastic and another AWS instance where you will spin up docker container shall be fast enough.
But, it always depend on what you do with such amount of data in your app, so bottleneck can come from some other source not only from NFS mounting.

Regards
Dusan

Hi Dusan!

Yes, that’s exactly what I have: AWS EFS and an EC2 with docker installed connected to an auto scaling group.

But when I add this line in the shinyproxy yml file:
container-volumes: [ "/host/path1:/container/path1", "/host/path2:/container/path2" ]

Doesn’t this mean that the big folder will be inside the container? I might be wrong, but I was thinking that every time a user connects to my app, a new container will be created, meaning that a new mount will be done. Is that correct?

If the mount process is fast even for a big AWS EFS, I will have no problem :slight_smile:

Regards,
Silvano

Mounted part will not be inside container. By mounting, container will access to that storage though network. Consider mounting as just process of mapping disk space so that you container can access it using network.

Agian, I say that performance of complete design will depend of what you shiny app is doing with that data. If you load part of that data into memory on start of your app, than it will consume time…

Regards
Dusan

Hi Dusan!

Thank you very much for the explanation! It’s clearer now :slight_smile:

This means that in my case I’ll probably have no problem, because I don’t load any data when the app starts. I just mount the EFS and only if the user clicks in some buttons the app will go the EFS and read and/or write data.

Regards,
Silvano