I tried to think of a way to use CDN module with File Conveyor with multiple webservers, but I don't see how to configure the pid and sqlite database file access from the secondary servers.

Should I put them in shared storage (e.g. NFS)? Or is it just "not recommended" to try to use a file conveyor CDN with multiple webservers?

Thanks!

Comments

wim leers’s picture

Assigned: Unassigned » wim leers

There's a fork of File Conveyor that adds MySQL support, which would solve this problem for you: https://github.com/wimleers/fileconveyor/issues/84. If you can turn this into a pull request, I'd be happy to merge it in, and that would solve this problem neatly.

Syncing from multiple servers (and thus with multiple File Conveyor instances) to a single destination is impossible (or at the very least a nightmare).

greggles’s picture

Thanks for the pointer. Unfortunately I don't have the time to work with the fork. We switch to an origin pull CDN instead, which seems relatively OK.

wim leers’s picture

Status: Active » Fixed

Origin Pull CDNs are definitely much easier to work with :) Unless you *really* want to see your files optimized, that's the recommended, least-worries way to go!

wim leers’s picture

Title: File conveyor and multiple web servers » File Conveyor and multiple web servers

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

pezholio’s picture

StatusFileSize
new9.56 KB

We have the same problem here - we have two nodes running the same codebase behind a load balancer. We have the CDN module installed, but as there's two sqlite databases, the module doesn't quite work as expected.

I've got a PR on the main File Conveyor Github repo for MySQL support and have managed to hack a solution into the module for MySQL support. I've attached a patch here - thoughts welcome!

pezholio’s picture

Status: Closed (fixed) » Patch (to be ported)
pezholio’s picture

StatusFileSize
new9.56 KB

Sorry, forgot to change the status!

pezholio’s picture

Status: Patch (to be ported) » Needs review
StatusFileSize
new9.56 KB

Ach. Trying again! Sorry, new to all this!

pezholio’s picture

StatusFileSize
new10.18 KB

Just updated the patch with some more configuration stuff. In the help text I said to leave the DB connection fields blank to use the default, but didn't actually implement the logic! This fixes that.

karenann’s picture

The patch in #10 worked well in our environment. Thanks!

wim leers’s picture

Issue summary: View changes
Status: Needs review » Closed (outdated)

I'm glad that #10 worked. But ever since almost 3 years ago, there has been pretty much zero feedback. Almost nobody is using File Conveyor.

The need for File Conveyor has diminished significantly, because most CDNs nowadays use the Origin Pull approach. That is also why the Drupal 8 port of the CDN module has removed File Conveyor support altogether.

The people who are using File Conveyor are also probably savvy enough to find this issue and this patch and apply it. But it's irrelevant for 99% of the users of the CDN module. So I'm going to close it, to get it out of sight of the majority.

Many thanks for your work here!