[Openstack] Load Balancers for Swift with nginx and pound

王娜 wangna220 at gmail.com
Fri Jun 14 10:43:21 UTC 2013


Hello,Stackers

First question:
I built  a swift cluser,two proxy server , one nginx server ---load balance
 for two swift proxy server,and  two storage server

1.when I  stop swift proxy service on one proxy server
The command " swift -V 2 -A http://172.18.56.195:5000/v2.0 -U
service:glance -K pass  list"  can not  list all  containers.

like this,before I stop the proxy service ,there are five containers.

root at proxy:~# swift -V 2 -A http://172.18.56.195:5000/v2.0 -U
service:glance -K pass  list
1
2
myfile
test
test3

once I stop one proxy server ,there are only 3 .

root at proxy:~# swift -V 2 -A http://172.18.56.195:5000/v2.0 -U
service:glance -K pass  list
1
2
test
the nginx.conf  like this
worker_processes  1;
events {
    worker_connections  1024;
}
http {
    include       mime.types;
    default_type  application/octet-stream;
    sendfile        on;
    keepalive_timeout  65;
    client_max_body_size 10024M;
    upstream swift {
        server 172.18.56.199:8080;
        server 172.18.56.235:8080;
         }
    server {
        listen       8080;
        server_name  authserver;
        location / {
            proxy_pass http://authserver/;
        }
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }
    }
}


Question 2:

Because of the nginx problem ,so I change  to use pound ,but
when I execute  the command
swift -V 2 -A http://172.18.56.195:5000/v2.0 -U service:glance -K pass stat
and
swift -V 2 -A http://172.18.56.195:5000/v2.0 -U service:glance -K pass list

It  runs successfully

but
can not execute  post  or  upload

the error like this
root at proxy:~# swift -V 2 -A http://172.18.56.195:5000/v2.0 -U
service:glance -K pass post 3
Container PUT failed:
http://172.18.56.194:80/v1/AUTH_aadcbf03cf904eb68742478c9ae38eb4/3 501 Not
Implemented   This method may not be used.

the pound.conf like this


User        "root"
Group       "root"
ListenHTTP
   Address 172.18.56.194
   Port    80

End

   Service
      #HeadRequire "(Host: your_host.com|Host: www.your_host.com)"
      BackEnd
         Address 172.18.56.235
         Port     8080
      End
      BackEnd
         Address 172.18.56.199
         Port     8080
      End

End



Cheers
Wenna
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20130614/d875db2f/attachment.html>


More information about the Openstack mailing list