Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7053847
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T03:33:17+00:00 2026-05-28T03:33:17+00:00

I am debating on storing images in the Mongo GridFS or on an cloud

  • 0

I am debating on storing images in the Mongo GridFS or on an cloud file system. I am leaning towards the cloud because of a few reasons.The language being used is PHP on a Nginx server.

  1. Storing images in the GridFS increases the size of the database. Therefore more of the database has to be in memory and I will spend more time/money managing the servers when it comes to things like sharding.

  2. Retrieving the image from GridFS takes longer than cloud because I have to
    a) Query the image using the id
    b) read the image into memory
    c) use a php header to display the image

The cloud would be better because its a url of the image directly to the cloud.

Does those reasons sound valid or should I be going in a different direction with my thinking?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T03:33:17+00:00Added an answer on May 28, 2026 at 3:33 am

    Its not entirely true.

    Storing images in the GridFS increases the size of the database.
    Therefore more of the database has to be in memory and I will spend
    more time/money managing the servers when it comes to things like
    sharding.

    Mongodb gridfs splits the huge files into the chunks and only they will be loaded and served (by each chunk) when it is requested . Yes definitely it ll take more memory than the file system. These are all the trade offs when using the in memory data stores.

    Retrieving the image from GridFS takes longer than cloud because I
    have to a) Query the image using the id b) read the image into memory
    c) use a php header to display the image

    As i stated in my previous point, it will be getting loaded into the memory at the first time. so you wont be having much of a performance problem, infact it ll be a gain since it served from RAM instead disk. But if you are not satisfied still, i would recommend to cache the images in nginx. so it wont come to mongo after the first one.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am debating using user-names as a means to salt passwords, instead of storing
I've seen a few interesting discussions recently debating whether or not a given (hard)
I'm debating with myself whether or not to compress a plain text file I'm
I am currently working on a system that involves storing multiple studies and details
I'm debating three different approaches to to storing sitewide settings for a web application.
I've been debating this to myself for the last few minutes, and I'm seeing
I'm debating on how to map a User struct to their socket file descriptor.
I'm debating the best way to propagate fairly complex permissions from the server to
I have been debating using css with div's and laying out elements, and really
I am debating on whether or not to write my own authentication class. It's

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.