Simple Machines Community Forum

SMF Support => SMF 1.1.x Support => Topic started by: qtime on June 19, 2009, 06:30:45 AM

Title: attachment directory on other server
Post by: qtime on June 19, 2009, 06:30:45 AM
I like to use a different server for storing the attachments, for several reasons:

_ To lower server load on the first (main server). I am using http://custom.simplemachines.org/mods/index.php?mod=1151 so much attachments to send.
_ The second server can be chosen for only data (more space).

I do understand it's not easy, but this will be a great option for me.
Title: Re: attachment directory on other server
Post by: Arantor on June 29, 2009, 08:40:37 AM
It depends.

Do you want to limit authorisation to the files based on people being logged in? If so, in all likelyhood it will not actually save you any work because it still has to be routed through SMF.

The alternative, as I have been working with someone on, is to move the attachments somewhere else, making them accessible to people browsing - meaning that anyone can potentially just download all the attachments without being a member.
Title: Re: attachment directory on other server
Post by: qtime on July 23, 2009, 12:12:17 PM
Quote from: Arantor on June 29, 2009, 08:40:37 AM
It depends.

Do you want to limit authorisation to the files based on people being logged in? If so, in all likelyhood it will not actually save you any work because it still has to be routed through SMF.

The alternative, as I have been working with someone on, is to move the attachments somewhere else, making them accessible to people browsing - meaning that anyone can potentially just download all the attachments without being a member.
thanks for your reply, it should be managed, not displayed to everyone!
Title: Re: attachment directory on other server
Post by: Arantor on July 23, 2009, 05:50:46 PM
In which case it won't save you any work because the server that is serving SMF still has to process the file in transit.
Title: Re: attachment directory on other server
Post by: qtime on July 24, 2009, 03:38:33 AM
Will using httplight a solution to speed up serving those attachments?
Title: Re: attachment directory on other server
Post by: Arantor on July 24, 2009, 06:51:40 AM
Not at all. The speed is limited to how fast PHP can serve the file - since it has to be routed through PHP in order for the permission to actually be granted. Ultimately it's down to how fast the file can be read and how fast it can be downloaded over the network.
Title: Re: attachment directory on other server
Post by: apTyaH on July 24, 2009, 12:44:06 PM
How about this mod?
custom.simplemachines.org/mods/index.php?mod=1669 (http://mods.simplemachines.org/mods/index.php?mod=1669) but its working only with images
Title: Re: attachment directory on other server
Post by: Arantor on July 24, 2009, 01:52:44 PM
I wouldn't recommend that mod. Note what it is doing: saving to a third party hosting service. Anyone with the URL could view the image.

The OP was after something that requires the user be logged in. There is no way to do that except via SMF.
Title: Re: attachment directory on other server
Post by: qtime on July 24, 2009, 05:22:03 PM
ok thanks for the info, at the moment I have good speed, using 2 servers (each 8 core xenon), one for http and one for database.
But when it's getting more visitors online (over 1000 in 15 minute) I need to disable the previews on every board index, now only donators have a switch to put that feature on or off, that is saving me a lot of cpu load
Title: Re: attachment directory on other server
Post by: Arantor on July 24, 2009, 05:44:54 PM
Did you try some of the tips in this thread (http://www.simplemachines.org/community/index.php?topic=293441.0)? The first one, about avatars, is a huge performance boost.