phpMyFAQ icon indicating copy to clipboard operation
phpMyFAQ copied to clipboard

Support for clustered deployment

Open jdunmore opened this issue 10 years ago • 3 comments

Hi,

We deploy our webservers in a multi node environment (we're using docker, but the notion of multiple transient web servers with transient file systems isn't a new one), therefore we have to make a special case for the deployment of phpmyfaq - i.e. it needs a persistent file storage server, that's shared across web nodes.

It would be great if you added support for asset storage in S3 buckets (regardless of our deployment setup, segregating assets from the code base is never a bad thing).

We use this for our solution, I'm sure you might find it helpful: https://github.com/thephpleague/flysystem

(then you can support multiple backends).

Thanks, James.

jdunmore avatar Dec 05 '15 13:12 jdunmore

@jdunmore That's a great idea, but I've got a few questions for clarification:

a) As I suppose you're talking about css/js/images and not any code that's included server-side, in my opinion the assets of the phpMyFAQ default template (your mileage may vary) are pretty minimal, so it probably can't be the space - is it about serving static content AT ALL versus php code?

b) There's also attachments, these would probably have to be saved to and retrieved from S3 as well?

So from a highlevel view, assuming /assets is the only path that's used - being able to rewrite this on the fly to something else would already cover use case a) - or are we talking "read from s3, send inline as base64"? I'm not disagreeing with your suggestion - just pondering how the result would look from and end user's PoV.

winks avatar Dec 05 '15 14:12 winks

From my point of view, it's all the attachments (should have said that) and user content - css/js/styling images can deal with as a redeployment of the code base, but "user" generated content is the issue here.

I haven't looked into the back end database of phpmyfaq, but if the reference to the attachements is a URI, then just pointing it to the s3 bucket URL should be a straight forward swap.

The advantage as well, is that it takes a lot of load off the webserver doing heavy lifting such as downloading PDFs, etc. Not to mention, it's then got backup by default.

Thanks.

jdunmore avatar Dec 05 '15 14:12 jdunmore

+1 for this - it would be great to be able to deploy phpMyFAQ to AWS or similar right away instead of implementing this in your own fork

juca2 avatar Dec 07 '15 08:12 juca2