Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to deploy multiple CEPH-RGW on a single machine

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

Editor to share with you how to achieve stand-alone deployment of multi-CEPH-RGW, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

Combined use of 1.nginx Radosgw

The Ceph official website explains how to use Apache as the front-end Web server, and then officially quit Civetweb as its own web server. However, considering the actual concurrency performance, we use Nginx as the front-end web server in conjunction with radosgw.

1.1 nginx configuration server {listen 80 default; # server_name .com .com.cn .net .cn .org .tv .cc ..tw; server_name ceph-21; location / {fastcgi_pass_header Authorization; fastcgi_pass_request_headers on; fastcgi_param QUERY_STRING $query_string; fastcgi_param REQUEST_METHOD $request_method; fastcgi_param CONTENT_LENGTH $content_length Fastcgi_param CONTENT_LENGTH $content_length; if ($request_method = PUT) {rewrite ^ / PUT$request_uri;} include fastcgi_params; fastcgi_pass unix:/var/run/ceph/ceph.radosgw.gateway1.sock;} location / PUT/ {internal; fastcgi_pass_header Authorization; fastcgi_pass_request_headers on; include fastcgi_params Fastcgi_param QUERY_STRING $query_string; fastcgi_param REQUEST_METHOD $request_method; fastcgi_param CONTENT_LENGTH $content_length; fastcgi_param CONTENT_TYPE $content_type; fastcgi_pass unix:/var/run/ceph/ceph.radosgw.gateway1.sock;}}

What needs to be paid attention to here is the parameter fastcgi_pass and the configuration of gateway.sock. The parameters need to correspond to ceph.confs. In the rgw configuration below, rgw_socket_path needs to be consistent with nginx fastcgi_pass so that the two processes can communicate based on fastcgi.

1.2 Ceph rgw configuration method [client.radosgw.gateway1] host = ceph-21rgw frontends = fastcgilog file = / var/log/radosgw/client.radosgw.gateway1.logkeyring = / etc/ceph/ceph.client.radosgw.keyringrgw_socket_path = / var/run/ceph/ceph.radosgw.gateway1.sock

Qin Muyang's blog explains the configuration method in detail.

Design of 2.1nginx load balance with multiple radosgw configuration on a single machine

Nginx0 uses upstream for load balancing

Upstream nginx-upstream-rgw {# ip_hash; server 10.71.21.31 ip_hash; server 81; server 10.71.21.31 Virgo 82; server 10.71.21.31 ip_hash; server 83; server 10.71.21.31 VR 84; server 10.71.21.31 85;} server {listen 80 default; server_name demo.ceph.work; location / {proxy_pass http://nginx-upstream-rgw; }}

Load balancing reference documentation

Each Nginx corresponds to a rgw, and the corresponding configuration method is referred to Section 1.

3 start each process 3.1 launch nginx/usr/local/nginx/sbin/nginx-c / usr/local/nginx/conf/nginx.conf/usr/local/nginx/sbin/nginx-c / usr/local/nginx/conf/nginx1.conf/usr/local/nginx/sbin/nginx-c / usr/local/nginx/conf/nginx2.conf/usr/local/nginx/sbin/nginx-c / usr/local/nginx/conf/nginx3.conf/usr/local/nginx/sbin / nginx-c / usr/local/nginx/conf/nginx4.conf/usr/local/nginx/sbin/nginx-c / usr/local/nginx/conf/nginx5.conf3.2 launch radosgwradosgw-c / etc/ceph/ceph.conf-n client.radosgw.gateway1 radosgw-c / etc/ceph/ceph.conf-n client.radosgw.gateway2radosgw-c / etc/ceph/ceph.conf-n client.radosgw.gateway3 radosgw-c / etc/ceph/ceph.conf-n client.radosgw.gateway4 radosgw-c / etc/ceph/ceph.conf-n client.radosgw.gateway54. Result test

I have tested the above structure, and the read, write, list and other operations of libs3 can be accessed normally, and the concurrency capability will be further tested later. In the same configuration, the concurrency of a single RGW test at 500K was 200; now there are 10 instances, and now the concurrency is more than 2000. Still need to enhance the concurrency ability of a single rgw. It is not a single thing to do this multi-example.

In this mode, RGW will show instability, which is mainly reflected in that when the pressure is overloaded, even if the stress test is stopped and revisited after a period of time, NGINX will burst a large number of 502errors. I will further follow up on this mistake.

The above is all the contents of the article "how to deploy multiple CEPH-RGW on a single machine". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report