Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Distributed file storage system and method based on Nginx + MinIO + Redis

A distributed file and storage system technology, which is applied in the field of distributed file storage system based on Nginx+MinIO+Redis, can solve the problems of large memory space occupation, low query performance, unsuitable for business, etc., to improve utilization rate, good Effect of cache hit ratio, good query performance

Pending Publication Date: 2022-07-29
福建财通信息科技有限公司
View PDF0 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

When the data scale becomes larger and larger, the access performance drops sharply; as a lightweight open source distributed file system, MinIO is suitable for the storage of small and medium-sized files, but MinIO stores the data on the disk, and each access needs to be accessed from the The disk reads data, and multiple IOs cause a decrease in query performance
In order to reduce the number of disk accesses and improve the file reading speed, an optional solution is to introduce Redis as a file cache service, but Redis is a memory-based database, and directly using Redis to cache files will cause excessive memory space occupation and low query performance Therefore, it cannot be applied to large-scale file data; in addition, when using Redis as a cache service, Redis provides a cache elimination strategy, which is not suitable for specific businesses, and the cache query hit rate is not high

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Distributed file storage system and method based on Nginx + MinIO + Redis
  • Distributed file storage system and method based on Nginx + MinIO + Redis
  • Distributed file storage system and method based on Nginx + MinIO + Redis

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0056] figure 1 It is an architecture diagram of a distributed file storage system based on Nginx+MinIO+Redis, in the embodiment of the present invention, a distributed file storage system based on Nginx+MinIO+Redis, the system includes:

[0057] The system includes a database and middleware; the middleware includes:

[0058] The picture processing module is used to perform a thumbnail operation on the picture based on the http_image_filter_module module in Nginx; the abbreviated operation includes scaling the picture with a specified width and height;

[0059] a storage module, used for distributed storage of file data based on the MinIO cluster; the storage module includes a file upload unit, a cache compression unit and a cache replacement unit;

[0060] The query module is used to perform file query operations on distributed cached files based on Redis cluster;

[0061] Delete module for performing delete operations on distributed files.

[0062] The invention provides ...

Embodiment 2

[0098] In an embodiment of the technical solution of the present invention, a distributed file storage method based on Nginx+MinIO+Redis is provided, the method is used for the query module, and the method includes:

[0099] Generate Key according to the query conditions entered by the user, and query Redis;

[0100] Determine whether there is a file in Redis, if there is no file in Redis, get the file md5, query MinIO according to the file md5, and return the file;

[0101] If there is a file in Redis, update the query times of the file; return the file decompressed by Gzip algorithm and decoded by Base64.

Embodiment 3

[0103] In an embodiment of the technical solution of the present invention, a distributed file storage method based on Nginx+MinIO+Redis is provided, the method is used for the deletion module, and the method includes:

[0104] Query Redis according to the deletion condition, and get the md5 of the file;

[0105] Determine whether there is a file cache in Redis. If there is a file cache in Redis, perform a simultaneous delete operation to delete the cache on Redis and the file on MinIO respectively;

[0106] When there is no file cache in Redis, delete the file saved on MinIO according to the file md5;

[0107] It is judged whether the file deletion is successful. When the file deletion is successful, an end command is generated.

[0108]The functions that can be realized by the distributed file storage method based on Nginx+MinIO+Redis are all completed by computer equipment, and the computer equipment includes one or more processors and one or more memories, and the one or ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention relates to the technical field of data storage, and particularly discloses a distributed file storage system and method based on Nginx + MinIO + Redis, and the system comprises a database and middleware; the middleware comprises a picture processing module and a picture processing module, wherein the picture processing module is used for carrying out thumbnail operation on a picture on the basis of an http - image - filter - module in Nginx; the abbreviation operation comprises zooming the picture according to the specified width and height; the storage module is used for carrying out distributed storage on the file data based on the MinIO cluster; the storage module comprises a file uploading unit, a cache compression unit and a cache replacement unit; the query module is used for executing file query operation on the distributed cached files based on the Redis cluster; and the deletion module is used for executing deletion operation on the distributed file. The invention provides a file compression caching strategy based on Thumbnalator, Base64 and Gzip compression algorithms, the problems that the length of a character string is too long and the occupied memory space is large when the Redis caches the file are solved, and the utilization rate of the memory space is improved.

Description

technical field [0001] The invention relates to the technical field of data storage, in particular to a distributed file storage system and method based on Nginx+MinIO+Redis. Background technique [0002] With the rapid development of informatization, files from all walks of life are stored in this process, and unstructured data and structured data are growing at an explosive rate. When the scale of data becomes larger and larger, the access performance drops sharply; as a lightweight open source distributed file system, MinIO is suitable for storage of small and medium files, but MinIO stores data on disk, and each access needs to The disk reads data, and multiple IOs cause query performance to decrease. In order to reduce the number of disk accesses and improve the reading speed of files, the optional solution is to introduce Redis as a file cache service, but Redis is a memory-based database. Using Redis to cache files directly will cause excessive memory space usage and...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F16/172G06F16/182
CPCG06F16/172G06F16/182
Inventor 张雄明
Owner 福建财通信息科技有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products