[sheepdog] add http transport stub
MORITA Kazutaka
morita.kazutaka at lab.ntt.co.jp
Thu Jul 4 09:16:33 CEST 2013
At Tue, 2 Jul 2013 00:35:26 +0800,
Liu Yuan wrote:
>
> This patch set adds transport stub, on top of which we can build Swift or Amazon
> S3 service.
>
> Only HTTP GET/PUT/POST/HEAD/DELETE (RESTful API) is allowd to interface with
> sheepdog storage.
>
> The transport is implemented via fastcgi in the address space of sheepdog to
> favor performance. It is currently disabled at compile time.
>
> How To Test:
>
> 1 install libfcgi-dev and nginx
> 2 ./configure --enable-http
> 3 run nginx as following:
> # edit ~/nginx.conf as following:
> =======================================================
> events {
> worker_connections 1024;
> }
>
> http {
> server {
> listen 80;
> server_name localhost;
>
> location / {
> fastcgi_pass localhost:7100;
>
> fastcgi_param SCRIPT_NAME $fastcgi_script_name;
> fastcgi_param REQUEST_METHOD $request_method;
> fastcgi_param CONTENT_LENGTH $content_length;
> fastcgi_param HTTP_RANGE $http_range;
> }
> }
> }
> =======================================================
Just for other users who want to try this feature: If you have the
root priviledge, adding the following to /etc/nginx/conf.d/sheep.conf
and restart the nginx service looks simpler way.
==
server {
listen 80;
server_name localhost;
location / {
fastcgi_pass localhost:7100;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param HTTP_RANGE $http_range;
}
}
==
Thanks,
Kazutaka
More information about the sheepdog
mailing list