Page 1 of 1

Can X3 on a Windows web server have its /galleries located on a NAS device?

Posted: 05 Oct 2024, 00:47
by JMM
Hello, Karl,

I tried searching for "nas" in the forums to see if this has been asked before, but the forums will not search for anything with less than 4 characters.

Due to diskspace constraints, is it possible for me to continue running my X3 sites on my Windows web server, but have my galleries content actually located on a NAS ?  Yes, I know that storage is cheap these days, but I am unable to install another (larger) drive on my web server.

Is there something in X3 that I can modify, so that X3 looks for the /galleries folder on my NAS ?  I can use either UNC (with IP) or a mapped-drive letter.

Thanks in advance.

Regards,
John

Re: Can X3 on a Windows web server have its /galleries located on a NAS device?

Posted: 05 Oct 2024, 04:25
by mjau-mjau
The main thing here, is that the PHP on your server needs to be able to read all images as if it is on a local disk. So for that to happen, the NAS needs to be setup as part of the servers storage device(s). You can't have a remote server look for images inside your local-hosted NAS dir ... Even if you managed to map it somehow, which is unlikely, it would be incredibly slow for the server to "read" data from a remote disk.

Having said that, I know it's possible to setup the entire web server on NAS with PHP and storage. In this case, you won't be using a "Windows web server" also, but just the NAS itself. Also, if you are intending to run a public website, you would need to use some dynamic DNS service to map your domain to your internet IP (I assume the NAS will be in your home). Tedious, but possible.

The cheapest "pro" solution you would find, would be to setup a $5.00/month server at vultr.com, and expanding storage with HDD (cheaper than SSD) for $1.00/month per 40GB. This requires you to manage the web server yourself though (eg install Nginx or Apache) through SSH.

Linking your home NAS drive to your web server in a different physical location is not going to work. Although you can host standalone images on cheap/external storage or Object Storage (like Amazon or Vultr $6.00 1TB), this won't normally work because it's not part of the server/PHP file system.

Re: Can X3 on a Windows web server have its /galleries located on a NAS device?

Posted: 05 Oct 2024, 08:23
by JMM
Thanks for clarifying that, Karl.  I suspected that was the case, but you have confirmed it.

I have noticed that I still have space for an SSD, so have ordered one.  Not sure which components would slow things down for X3.  My web server's processor is an i9 with 128-GB of memory, so I assume those would not be a bottleneck.  Similarly, Internet speed is 1-GB.  My X3 sites are currently running on a M.2 drive, but the drive that I ordered is just a 2.5" SSD.  If I were to transfer all my X3 sites to the new SSD, would X3 be noticeably slower because it will then be running on a much-slower SSD?  If the faster M.2 drive would be best for X3 for speed, I could easily move all my other data off the M.2 to the SSD, and keep just X3 on the M.2 drive.

I ask this question, because you may reply that the bottleneck with the slowest part would be the Internet upload speed, so which drive I were to use would be irrelevant.

Thanks in advance.

Re: Can X3 on a Windows web server have its /galleries located on a NAS device?

Posted: 05 Oct 2024, 23:16
by mjau-mjau
JMM wrote:I have noticed that I still have space for an SSD, so have ordered one.  Not sure which components would slow things down for X3.  My web server's processor is an i9 with 128-GB of memory, so I assume those would not be a bottleneck.  Similarly, Internet speed is 1-GB.  My X3 sites are currently running on a M.2 drive, but the drive that I ordered is just a 2.5" SSD.  If I were to transfer all my X3 sites to the new SSD, would X3 be noticeably slower because it will then be running on a much-slower SSD?  If the faster M.2 drive would be best for X3 for speed, I could easily move all my other data off the M.2 to the SSD, and keep just X3 on the M.2 drive.
This question is somewhat unrelated to the original question of course. If we are speaking of your own server, it will make very little difference if the physically attached disk is SSD or M.2. Both are fast and won't generally provide any bottleneck. Unless you have 1000's of simultaneous visitors perhaps. Of course, I know nothing else about your server ... Where is it located? Is it located at a professional server park, or your own internet/location? Is it shared? CPU and memory? Disk is not going to make any difference here.
JMM wrote:I ask this question, because you may reply that the bottleneck with the slowest part would be the Internet upload speed, so which drive I were to use would be irrelevant.
Drive speed is largely irrelevant, as long as it's a physical disk attached to the server (because the server PHP/CPU must be able to read/write the disk at absolutely minimum delays). In terms of internet speed, you can't really compare internet speed with disk speed, because it depends on other visitors and usage of the disk. For instance, if you have 1000 simultaneous visitors on your website, then disks will be the bottleneck. If you are only one visitor, then likely your internet will be the bottleneck. Also, when you request an image from your browser, first the disk must access it, and THEN it will start outputting it to the internet ... So it's not strictly a simultaneous "bottleneck" event. Both will come into play.