[Gluster-devel] Refactoring mod_glusterfs as mod_proxy_glusterfs

Cedric Veilleux cveilleux at neopeak.com
Wed Feb 18 20:20:43 UTC 2009


Hi,

Apache 2.x supports an extensible "proxy" module. Do you think it would
be possible to rewrite the mod_glusterfs for apache 2.2 as a mod_proxy
backend?

This would allow a more flexible glusterfs configuration, especially
with many virtual hosts sharing the same glusterfs client. For example
mod_proxy_glusterfs could be configured like that:

Global config:
<Proxy glusterfs://mygluster>
    Order Allow,Deny
    Allow from all

    GlusterfsVolumeSpecfile "/etc/glusterfs/glusterfs-client.spec"
    GlusterfsLogfile "/var/log/glusterfs/glusterfs.log"
    GlusterfsLoglevel "warning"
</Proxy>


Virtual host 1:
ProxyPass / glusterfs://mygluster/vhost1/

Virtual host 2:
ProxyPass / glusterfs://mygluster/vhost2/


This would serve the files in /vhost1/ directory of the glusterfs share
on the first virtual host and /vhost2/ on the second. There would also
only be one global instance of the gluster client, so threads, cache,
and everything could be shared with all the virtual hosts, so there is
no huge overhead even if you have hundreds of virtual hosts.


Right now, the only way I can think of implementing this would be to use
2 apache servers: One with mod_glusterfs exporting the complete
glusterfs share just like the wiki page instructs, and another apache
server using mod_proxy_http in a similar configuration as above but
using the plain mod_proxy_http instead of the non-existent
mod_proxy_glusterfs. The extra-overhead of the two http servers would
certainly destroy the advantage of mod_glusterfs altogether...




Thank you,

Cédric






More information about the Gluster-devel mailing list