# Nginx support fot Weedfs!

**URL:** <https://www.ruby-forum.com/t/nginx-support-fot-weedfs/242457>\
**Category:** NGINX\
**Created:** [June 25, 2015, 1:17am UTC](https://www.ruby-forum.com/t/nginx-support-fot-weedfs/242457 "2015-06-25T01:17:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Detlef\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/58f4c7/32.png) [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Post date:** [June 25, 2015, 1:17am UTC](https://www.ruby-forum.com/t/nginx-support-fot-weedfs/242457/1 "2015-06-25T01:17:37Z")

</div>

Hi,

We’re deploying WeedFS distributed filesystem for thumbs storage and  
scalabilty. Weedfs is composed of two layers (Master, Volume). Master  
server does all metadata mapping to track the corresponding volume  
server  
against user requested file whereas volume server is the actual storage  
to  
serve those requested files back to user via HTTP. Currently, weedfs  
default webserver is being used as HTTP but it would be better to have  
nginx webserver on volume servers for its low foot prints, stability and  
robust response time for static .jpg files.

So we need to know if we can use nginx with weedFS ? Following is the  
github we found, but need to confirm if it will fulfill our needs ?

> **[GitHub - medcl/lua-resty-weedfs: weefs,lua,nginx and file post processing...](https://github.com/medcl/lua-resty-weedfs)**
>
> weefs,lua,nginx and file post processing with ffmpeg and graphicsmagick - GitHub - medcl/lua-resty-weedfs: weefs,lua,nginx and file post processing with ffmpeg and graphicsmagick

Thanks in advance.

Regards.  
Shahzaib

---

<div class="post-metadata">

**Author:** ![shahzaib12](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/90db22/32.png) [@shahzaib12](https://www.ruby-forum.com/u/shahzaib12)\
**Post date:** [July 2, 2015, 5:12pm UTC](https://www.ruby-forum.com/t/nginx-support-fot-weedfs/242457/2 "2015-07-02T17:12:29Z")

</div>

Guys any advice ?

On Thu, Jun 25, 2015 at 4:17 AM, shahzaib shahzaib  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![shahzaib12](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/90db22/32.png) [@shahzaib12](https://www.ruby-forum.com/u/shahzaib12)\
**Post date:** [July 4, 2015, 12:14pm UTC](https://www.ruby-forum.com/t/nginx-support-fot-weedfs/242457/3 "2015-07-04T12:14:43Z")

</div>

On Thu, Jun 25, 2015 at 04:17:19AM +0500, shahzaib shahzaib wrote:

Hi there,

I’ve read your mail, and I am not sure what your planned architecture  
is – as in, at what point do you want nginx to be used.

> Currently, weedfs  
> default webserver is being used as HTTP but it would be better to have  
> nginx webserver on volume servers for its low foot prints, stability and  
> robust response time for static .jpg files.
> 
> So we need to know if we can use nginx with weedFS ?

If you want to replace the weed volume server (which exposes a http  
interface to clients) with the nginx http server, then you will probably  
need to reimplement whatever it is that the weed volume server does that  
nginx does not do.

Or you could try to use nginx for some of what the weed volume server  
does, and implement some way of “passing off” the rest of what the weed  
volume server does, to the weed volume server.

Either way, you’ll probably need to arrange for code to be written.

If you want the browser to make a request of nginx, and then have nginx  
fetch the content from the weedfs service, then you will need a weedfs  
client available within nginx.

That should be doable, but will take some coding since it does not exist  
in stock nginx.

> Following is the  
> github we found, but need to confirm if it will fulfill our needs ?
> 
> [https://github.com/medcl/lua-resty-weedfs](https://github.com/medcl/lua-resty-weedfs)

That does not look like a complete weedfs client to me; but it may be  
enough for your needs, depending on what exactly your needs are.

It shouldn’t be too difficult to set up a small test to see that it does  
do what you want, at the speed you want.

If you can describe your intended data flow – starting with something  
like “the browser will get _this_ url which has _this_ content” –  
then it may be clearer what you are trying to achieve.

Good luck with it,

## f

Francis D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
