PDA

View Full Version : Upload attachment to external server


tareqbd
06-19-2013, 03:50 PM
I was thinking if it is possible to write a script to allow uploading the attachments/images to external or another server using cdn.maindomain.com
It would be great as will not use much time in restoration and back up process if files are stored in different ftp server.
I wish some coders can do it.

cravendale
07-01-2013, 09:19 PM
This would be a great idea.

Zachery
07-01-2013, 10:50 PM
So, I know its possible, but what is the advantage?

You need some basic resources to be stored on the remote server as well. attachments are currently served via php. Which means attachment.php and its required files would also have to be stored on the remote server, and a remote db request would have to sent as well.

tareqbd
07-07-2013, 01:17 PM
So, I know its possible, but what is the advantage?

You need some basic resources to be stored on the remote server as well. attachments are currently served via php. Which means attachment.php and its required files would also have to be stored on the remote server, and a remote db request would have to sent as well.
If the contents are served using remote db, isn't it vulnerable? I wanted to use ftb server only.Well, the advantage I thought is "won't need more time to restore the main db, in-case I need to change the webhost.

Zachery
07-08-2013, 02:01 PM
That sounds like a bad idea.

vbresults
07-09-2013, 02:42 PM
There is a safe way to implement this idea. How likely anyone is to make it for vBulletin.org is another question.

Zachery
07-09-2013, 07:20 PM
There is a safe way to implement this idea. How likely anyone is to make it for vBulletin.org is another question.

There are tons of safe ways to do this, however most of them seem to have a rather large amount of overhead that complicates the entire matter. Esp if someone just wants to store their attachments offsite to avoid "downtime" when moving hosts.

Manoel J?nior
01-26-2014, 09:04 PM
I need this

ozzy47
01-26-2014, 09:25 PM
There really is no need to do this, if you are having server issues due to images, it's time to upgrade the server, not look for band-aids to put on it.

tbworld
01-26-2014, 10:10 PM
There are tons of safe ways to do this, however most of them seem to have a rather large amount of overhead that complicates the entire matter. Esp if someone just wants to store their attachments offsite to avoid "downtime" when moving hosts.

I have to agree with @Zachery here. You would know if you absolutely needed a setup like this. The guy that has a cheap host and does not have the storage for attachments, this is not a work-around. No money/time will be saved with this kind of an arrangement in the long-run. In most cases we conjure up these ideas and their complexities, but are they really needed? Who is going to handle the support when things go awry? The question is never can it be done. :)

I use a setup like this, since two or three high resolution images are usually attached to every post, and during the week we have around 500 posts per day with pictures. We unfortunately had to use this kind of setup, but I would not carry over the complexity we added -- and have to maintain -- to the other boards I run.

RichieBoy67
01-26-2014, 11:12 PM
I think it would increase load times as well having to pull your data from a remote host instead of the local server.

tbworld
01-26-2014, 11:28 PM
I think it would increase load times as well having to pull your data from a remote host instead of the local server.

We had to make quite a few adjustments, an advancement to the post cache and a specialized attachment cache -- just to name a few. We were forced to this method due to large attachment processing and manipulating. The average vBulletin owner has really no need for this kind of complexity, maybe a large specialty photo site. I spoke out because I thought @Zachery needed some support on his view/statements. This question seems to pop-up now and then, and I figured I could add some insight.

RichieBoy67
01-27-2014, 12:01 AM
We had to make quite a few adjustments, an advancement to the post cache and a specialized attachment cache -- just to name a few. We were forced to this method due to large attachment processing and manipulating. The average vBulletin owner has really no need for this kind of complexity, maybe a large specialty photo site. I spoke out because I thought @Zachery needed some support on his view/statements. This question seems to pop-up now and then, and I figured I could add some insight.I wasn't questioning you or anything. I was just adding in response to the op. I'm sure you had reasons and it sounds like you made it work well.

tbworld
01-27-2014, 03:30 AM
I wasn't questioning you or anything. I was just adding in response to the op. I'm sure you had reasons and it sounds like you made it work well.

No worries, I took your response as the good-natured intent that you meant. I am sorry if my response in anyway indicated that I did not. I try to write my responses for anyone reading the thread, the idea was to add additional helpful content that I decided to append to the end of the post. Sorry, I think I confused you in my effort to write to the general audience.

After reading it over, I should have started my reply with "I agree with you". I was really trying to explain why I needed such a monster and that for most people it is total overkill. I did not even get into the fact that we run a modified version of PHP where we run our caches in a common static memory module, so they do not have to be refreshed or rebuilt every page. All of this was done just to get back some of the performance loss you were indicating.

Your input is always welcome. :)

RichieBoy67
01-27-2014, 04:43 PM
It's all good friend! Not like I was mad or anything. :) All good points and good discussion.:up: