In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
When the number of users becomes larger and larger, a certain group in the cluster will always reach its limit, so it is necessary to expand the capacity of the cluster.
The expansion of FastDFS can be divided into vertical expansion and horizontal expansion of group.
Vertical expansion refers to adding servers in the same group group to achieve data redundancy and data backup. The maximum capacity in the same group depends on the storage capacity of the smallest storage. So if you want to continue using this group, you need to mount disks of the same capacity to all servers corresponding to this group, and specify store_path2. But the cost of doing so is quite high and is not recommended.
Horizontal expansion is achieved through clusters, which means adding a group to increase the storage space of the entire FastDFS. The storage space of fastDFS refers to the combined storage capacity of all group.
The following is an introduction to horizontal expansion.
In the highly available and high-performance distributed file system FastDFS advanced keepalived+nginx for high-availability hot backup of multi-tracker, we have talked about how to configure 2 tracker and 4 storage of the cluster, divided into group1 and group2, and add a set of group3 below, which is also composed of two servers, group3:36, 37.
Install storage
Deploy storage storage nodes for high-availability hot spares for multi-tracker according to the advanced keepalived+nginx of high-availability and high-performance distributed file system FastDFS.
Install nginx and fastdfs-nginx-module to storage storage sections 36, 37.
The other group_name=group3 contents in / etc/fdfs/storage.conf are the same as other storage storage sections.
Then open the two storage and add boot boot:
/ usr/bin/fdfs_storaged / etc/fdfs/storage.conf
Chkconfig fdfs_storaged on
To view the status of the cluster, the overall content is displayed:
/ usr/bin/fdfs_monitor / etc/fdfs/storage.conf
Install and configure nginx
The content of the / opt/nginx/conf/nginx.conf file is the same as other nodes.
Modifiable / etc/fdfs/mod_fastdfs.conf
Group name of the first group storage of base_path=/data/fastdfs/storagetracker_server=192.168.80.30:22122tracker_server=192.168.80.31:22122storage_server_port=23000group_name=group3 # url_have_group_name=truestore_path0=/data/fastdfs/storagegroup_count= 2 [group1] group_name=group1storage_server_port=23000store_path_count=1store_path0=/data/fastdfs/ storages [group2] group_name=group2storage_server_port=23000store_path_count=1store_path0=/data/fastdfs/ storages [group3] group_name=group3storage_server_port=23000store_path_count=1store_path0=/data/fastdfs/storage
Note:
Add to the / etc/fdfs/mod_fastdfs.conf of storage nodes 32 to 37
[group3] group_name=group3storage_server_port=23000store_path_count=1store_path0=/data/fastdfs/storage starts Nginx and adds and starts itself
Shell > / opt/nginx/sbin/nginx
Upload the test file to group3.
The files uploaded during the browser access test should be accessible normally.
Http://192.168.80.36:8888/group3/M00/00/00/CgNXGVpddOKANpzbAABdrZgsqUU369_big.jpg
Http://192.168.80.37:8888/group3/M00/00/00/CgNXGVpddOKANpzbAABdrZgsqUU369_big.jpg
Configure Nginx, set up tracker load balancing and caching
Vi / opt/nginx/conf/nginx.conf
Add the following
# set the group3 server upstream fdfs_group3 {server 192.168.80.36 server 8888 weight=1 max_fails=2 fail_timeout=30s;server 192.168.80.37 server 8888 server} and location / group3/M00 {proxy_next_upstream http_502 http_504 error timeout invalid_header; proxy_cache http-cache; proxy_cache_valid 200 304 12h; proxy_cache_key $uri$is_args$args Proxy_pass http://fdfs_group3; expires 30d;}
Just restart nginx.
From the above, adding the installation and configuration of group,storage to the cluster is very simple, mainly because the configuration of nginx and fastdfs-nginx-module is troublesome, and you need to add groups manually, so you should pay attention to the above points not to be left out.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.