Linux uses mogilefs Distributed File system and uses Nginx to implement reverse proxy

Source: Internet
Author: User
Tags file copy install perl nginx reverse proxy

MogileFS is a set of efficient file automatic backup components, developed by six apart and widely used in web2.0 sites including LiveJournal.
features of the mogilefs:
Work in the application layer, no single point, automatic file copy (the smallest unit of replication is class, not a file), transmission is neutral and is transmitted using NFS or the HTTP protocol.
the structure of the mogilefs consists of:
650) this.width=650; "Src=" http://img.blog.csdn.net/20170510144610328?watermark/2/text/ ahr0cdovl2jsb2cuy3nkbi5uzxqva2fpcnvpmtiz/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70/gravity/ Southeast "alt=" here to write a picture describing "title=" "style=" border:none; "/>
Tracker: Is the core of MogileFS, is a scheduler, through the database to save meta-information, including daemon,class,host and other information, the main responsibility: monitoring the backend Mogstore node, and instruct the store node to complete the data add, delete, query, And the replication between nodes.
Mogstore: Where the actual data is stored, usually pseudo an HTTP server.
Database: The global information used to hold the node.

1. install MogileFS  
A. Download mogilefs 
mogilefs-server:https://github.com/mogilefs/ mogilefs-server 
mogilefs-utils:https://github.com/mogilefs/mogilefs-utils 
perl-mogilefs-client:https://github.com/mogilefs/perl-mogilefs-client 
B. Install:  
Unzip the file and enter it in the file

[email protected] nginx-1.11.12]# make makefile.pl
[[email protected] nginx-1.11.12]# make && make install
[email protected] nginx-1.11.12]# Yum install perl-io-aio123123

2. configuration file Explanation

Parameter answer: Total dosage 8

3. Start and test

1. Create the/VAR/RUN/MOGILEFSD directory and modify the genus owner
[Email protected] mogilefs]# mkdir-p/VAR/RUN/MOGILEFSD
[Email protected] mogilefs]# chown-r mogilefs.mogilefs/var/run/mogilefsd/
2. Create the/mog/mogdata directory and modify the genus owner
[Email protected] mogilefs]# mkdir-p/mog/mogdata
[Email protected] mogilefs]# chown-r mogilefs.mogilefs/mog/mogdata/
3. Start the MOGILEFSD process and the mogstored process
[[Email protected] mogilefs]# service MOGILEFSD start
Starting MOGILEFSD
[[Email protected] mogilefs]# service mogstored start
Starting mogstored
* * The startup script here is installed with the RPM package and comes with a no service script that is typically installed using make

4. Configuring the Mogstord node host using the Administration tool

* * File Actual access location * *

5.access using a browser
650) this.width=650; "Src=" http://img.blog.csdn.net/20170510164811709?watermark/2/text/ ahr0cdovl2jsb2cuy3nkbi5uzxqva2fpcnvpmtiz/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70/gravity/ Southeast "alt=" here to write a picture describing "title=" "style=" border:none; "/>
Such a mogilefs distributed storage is set up, just the MOGILEFSD process and the mogstored process on the unified host.
6.Load Balancing Design structure
650) this.width=650; "Src=" http://img.blog.csdn.net/20170510170535532?watermark/2/text/ ahr0cdovl2jsb2cuy3nkbi5uzxqva2fpcnvpmtiz/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70/gravity/ Southeast "alt=" here to write a picture describing "title=" "style=" border:none; "/>
7.use Nginx, now reverse proxy
using Nginx reverse proxy mogilefs, to use the third-party module in the implementation of the proxy, Nginx does not support the MogileFS agent, download module fast for nginx_mogilefs_module,:http:// Www.grid.net.ru/nginx/download/nginx_mogilefs_module-1.0.4.tar.gz

* * For detailed parameters, please refer to the official documentation: http://www.grid.net.ru/nginx/mogilefs.en.html**

8. Configure two MogileFS hosts
When two hosts are configured, the MOGILEFSD process reads the information of the Mogstord node in the database, which can be configured as described above in the configuration, recommended to be configured on one MOGILEFSD node, and the other node can be read in the database.
9. Test Results
650) this.width=650; "Src=" http://img.blog.csdn.net/20170510195138842?watermark/2/text/ ahr0cdovl2jsb2cuy3nkbi5uzxqva2fpcnvpmtiz/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70/gravity/ Southeast "alt=" here to write a picture describing "title=" "style=" border:none; "/>


This article is from the "Lnsanellinux" blog, make sure to keep this source http://lnsane784.blog.51cto.com/1226518/1930436

Linux uses mogilefs Distributed File system and uses Nginx to implement reverse proxy

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.