Unverified Commit 3cd979d5 authored by Faria Masood's avatar Faria Masood Committed by gitbook-bot
Browse files

GitBook: [master] 3 pages modified

parent d71db4f0
......@@ -144,6 +144,7 @@
* [Google Cloud Storage](guides/administrator-guides/file-upload/google-cloud-storage.md)
* [Minio](guides/administrator-guides/file-upload/minio.md)
* [WebDAV](guides/administrator-guides/file-upload/webdav.md)
* [Recommendations for File Upload](guides/administrator-guides/file-upload/recommendations-for-file-upload.md)
* [Import](guides/administrator-guides/import/README.md)
* [HipChat](guides/administrator-guides/import/hipchat/README.md)
* [HipChat Cloud](guides/administrator-guides/import/hipchat/cloud.md)
......@@ -99,6 +99,8 @@ Time after which Amazon S3 generated URLs will no longer be valid \(in seconds\)
## FileSystem
### System Path
The local path for where the uploaded files will be stored.
# Recommendations for File Upload
## GridFS
GridFS is the MongoDB specification for storing and retrieving large files such as images, audio files, video files, etc. It is kind of a file system to store files but its data is stored within MongoDB collections. GridFS has the capability to store files even greater than its document size limit of 16MB.
GridFS divides a file into chunks and stores each chunk of data in a separate document, each of maximum size 255k.
GridFS by default uses two collections **fs.files** and **fs.chunks** to store the file's metadata and the chunks. Each chunk is identified by its unique \_id ObjectId field. The fs.files serves as a parent document. The **files\_id** field in the fs.chunks document links the chunk to its parent.
Though GridFS is used in Rocket.Chat for file storage because MongoDB offers this functionality with zero configuration but GridFS is not recommended for day to day file storage needs in a production environment because it puts an immense amount of load on the database.
{% hint style="info" %}
It is only sustainable if you are using Retention Policy and only storing a small number of files per week which are not hefty but it is not recommended by us.
{% endhint %}
## FileSystem
It stores the files on the FileSystem of the server where your Rocket.Chat instance is running. It is a good option but the problem arises when you start to scale. Because if you decide to have multiple rocket.chat servers to support a larger number of users, the FileSystem needs to be shared between all the rocket.chat servers.
If you want to have two separate virtual/physical servers you will somehow have to share the folder too where your files are stored using for example NFS. It will require a lot of configurations.
{% hint style="info" %}
We recommend it only when you are using a single virtual/physical server.
{% endhint %}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment