XF performance with local data or external cloud storage

zeus1971

Collaborate
Collaborate
Registered
Joined
Apr 18, 2020
Messages
310
Points
73

Reputation:

Hello,
at the end I could configure in my DEV enviroment, an external storage to use DATA and INTERNAL_DATA, in XF, using B2 (backblaze) cloud storage, that is compatible with S3 API. So following the guide for S3 will be quite easy.
All works fine.

Now, my question is if for your expience would be better configure XF to use external cloud storage (B2) or not, considering that :
- Actually I don't have space problems in my share hosting. ( 85% space free)
- My community forum (in production) is based overall on images and a few videos (I set a limit actually of 10/15 MB for video attachment)
- I use a CDN (bunnycdn) but as you know, CDN can cache only attachments in DATA, thumbnails and avatars, not INTERNAL_DATA: full images size.

My thought, maybe wrong, is that loading images (and some videos) hosted in external storage (B2 in my case) is much better than local storage. (considering that is a share host).
I think that server will be less stressed. ( but for other hand, maybe there are others problems...I don't know)

Any hints or comments will be appreciated :)
 

sucre13

Moderator
Staff member
Moderator
Collaborate
Registered
Joined
Jan 19, 2019
Messages
840
Points
153

Reputation:

The only thing that scares me is that if that external server has a problem, the videos and saved images will be lost
 

zeus1971

Collaborate
Collaborate
Registered
Joined
Apr 18, 2020
Messages
310
Points
73

Reputation:

Well, of course backup is needed, and I can do it.. Like I (usually :rolleyes: ) do it in my share hosting.
 

zeus1971

Collaborate
Collaborate
Registered
Joined
Apr 18, 2020
Messages
310
Points
73

Reputation:

What I really I don't know is if really performance are better. Becouse ok, all images and videos are links to external storage, so my server is not so stressed, but will be also a delay...for connections. (in my DEV enviroment I didn't see problems..., but no users, no traffics..)
 

Tentation

Member
Registered
Joined
Sep 24, 2020
Messages
22
Points
13

Reputation:

I strongly advise against shared hosting, the first few times I used it too, now I have a server of my own, ubuntu 18.04 nginx configuration and php7.4 and redis, and it's very fast, the site is speeding. You don't need to have better performance migrating files and folders, it all depends on the server on "its" performance. Yes yes I do not recommend it!
 

zeus1971

Collaborate
Collaborate
Registered
Joined
Apr 18, 2020
Messages
310
Points
73

Reputation:

@Tentation Yes, but actually a VPS is too much for my community and entries ($$).
My hosting (cosidering the shared...) is not so bad, PHP7.4, litespeed (where an addon for XF exists) , automatic backups, and no downtime in years.
The problems is when you works with many connections at the same times, many images to load, private messages, email to send..., you know.
And "maybe" a dedicated external storage (overall for images) can help. ( a bit , a lot ? I don't know..., and I'm asking :) )
 

Tentation

Member
Registered
Joined
Sep 24, 2020
Messages
22
Points
13

Reputation:

@zeus1971 yes you're right, it would be good for your community, you may have future problems, but I was wondering, if your community is not big enough what do you need to increase server performance by migrating files and folders? for space?
 

zeus1971

Collaborate
Collaborate
Registered
Joined
Apr 18, 2020
Messages
310
Points
73

Reputation:

@Tentation No, I have space at the moment. No problem for that. It was just an idea, that having the files (attachments/XFMG) in external storage was more "light" for my server, and better performance to load.
 

zeus1971

Collaborate
Collaborate
Registered
Joined
Apr 18, 2020
Messages
310
Points
73

Reputation:

So, at the end, all my "work" to get external path working with B2, for nothing ? omg...:cry::ROFLMAO:
 

zeus1971

Collaborate
Collaborate
Registered
Joined
Apr 18, 2020
Messages
310
Points
73

Reputation:

I tried again with the addon https://enxf.net/resources/bd-attachment-store-for-xenforo-2-x.627/ and it works!
Probably my previous problems were caused by DB corruption due to update between versions and tests...
I'm still no confortable to use it at 100%, becouse I would like the options to go back, restore all configuration and files knowing exactly what this addon does, without using a full backup of my site, but ok...considering that let me cache full images, its' OK.

Now the problem is the lightbox with attachments in posts that is not working ( in XFMG works perfect).
AND...It open the full image in a new browser window.
And testing, the problem is the code in config.php pointing to my CDN. If I comment the line pointing to my CDN for externalURL, lightbox works.
I tried with or without adapters, but the problem is the same : if externalURL has my cdn URL, lightbox is not working.

Any Idea ? @Pr0fesseur did you have the same problem ? ( I'm testing with v. 2.2 RC2 )

Here the config.php , but it's quite normal , standard. And it works, but open the full images in a new window. In XFMG in the lightbox. :unsure:


PHP:
$config['externalDataUrl'] = 'https://cdn.mydomain.com/forum/data';
$config['javaScriptUrl'] = 'https://cdn.mydomain.com/forum/js';
 
Last edited:

zeus1971

Collaborate
Collaborate
Registered
Joined
Apr 18, 2020
Messages
310
Points
73

Reputation:

Ok, just an update : the problem is definitely the "cdn".mydomain.com path.
If I set as above, lightbox works. It seems that it take my subdomain (CNAME) as an external links and doesn't apply lightbox configuration.

$config['externalDataUrl'] = 'https://mydomain.com/forum/data'; OK works.
$config['externalDataUrl'] = 'https://cdn.mydomain.com/forum/data'; OPEN in a NEW browser tab.


But I don't know where and what change in some template/macro....
 

Tentation

Member
Registered
Joined
Sep 24, 2020
Messages
22
Points
13

Reputation:

brò you saw that no one answers you, no one knows what you are doing, in my opinion you are in the wrong category, it is not a support category, so do not write these things here, please leave out these little problems that we sincerely do not care, I repeat it is not a support category and it is not a forum mainly where you can post these things. Thanks.
 

zeus1971

Collaborate
Collaborate
Registered
Joined
Apr 18, 2020
Messages
310
Points
73

Reputation:

Well, may be the category is wrong (not general discussion..) but why shouldn't I write here ???
Is a xenforo forum related.
But maybe I'm wrong and we are speaking of Drupal...:rolleyes::sneaky:
 

sucre13

Moderator
Staff member
Moderator
Collaborate
Registered
Joined
Jan 19, 2019
Messages
840
Points
153

Reputation:

My question is and that has to bother you to put yourself like that and answer him that way is a valuable information if he wants to share his learning leave him the internet is free to you, it can not help others.
 

zeus1971

Collaborate
Collaborate
Registered
Joined
Apr 18, 2020
Messages
310
Points
73

Reputation:

EDIT - SOLVED :
at the end I installed the addon: xrocks db attachments store, and it works with CDN.
There is only a problem with lightbox for attachments at posts, probably solve with next XF release : 2.2.1

I'm still not confortable with this addon, becouse is not clear to me how go back to standard XF configuration if needed or if something happend to this addon (without loose images..) ..., but...that's the situation.
 

fmsc88

Collaborate
Collaborate
Registered
Joined
May 22, 2019
Messages
104
Points
53

Reputation:

I'm using this addon for years, to not lose the images etc if something happens to this addon the only way is to keep the files on your server is to check Keep Local Copy option.

You can check Keep Local Copy option and you will have the files on your server and on the external server. Using this option you can uninstall the addon anytime, otherwise forget the files if something happens to this addon.All images and attachments links will be broken.
 

zeus1971

Collaborate
Collaborate
Registered
Joined
Apr 18, 2020
Messages
310
Points
73

Reputation:

thx for the feedback. And this option exists for "external storage" option ? ( I mean, in my configuration, full images are stored in /data/attachments-file..., not in S3 or other cloud storage)
 
Top