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 96173
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T23:46:24+00:00 2026-05-10T23:46:24+00:00

I have a simple question and wish to hear others’ experiences regarding which is

  • 0

I have a simple question and wish to hear others’ experiences regarding which is the best way to replicate images across multiple hosts.

I have determined that storing images in the database and then using database replication over multiple hosts would result in maximum availability.

The worry I have with the filesystem is the difficulty synchronising the images (e.g I don’t want 5 servers all hitting the same server for images!).

Now, the only concerns I have with storing images in the database is the extra queries hitting the database and the extra handling i’d have to put in place in apache if I wanted ‘virtual’ image links to point to database entries. (e.g AddHandler)

As far as my understanding goes:

  • If you have a script serving up the images: Each image would require a database call.
  • If you display the images inline as binary data: Which could be done in a single database call.
  • To provide external / linkable images you would have to add a addHandler for the extension you wish to ‘fake’ and point it to your scripting language (e.g php, asp).

I might have missed something, but I’m curious if anyone has any better ideas?


Edit: Tom has suggested using mod_rewrite to save using an AddHandler, I have accepted as a proposed solution to the AddHandler issue; however I don’t yet feel like I have a complete solution yet so please, please, keep answering 😉

A few have suggested using lighttpd over Apache. How different are the ISAPI modules for lighttpd?

  • 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. 2026-05-10T23:46:24+00:00Added an answer on May 10, 2026 at 11:46 pm

    If you store images in the database, you take an extra database hit plus you lose the innate caching/file serving optimizations in your web server. Apache will serve a static image much faster than PHP can manage it.

    In our large app environments, we use up to 4 clusters:

    • App server cluster
    • Web service/data service cluster
    • Static resource (image, documents, multi-media) cluster
    • Database cluster

    You’d be surprised how much traffic a static resource server can handle. Since it’s not really computing (no app logic), a response can be optimized like crazy. If you go with a separate static resource cluster, you also leave yourself open to change just that portion of your architecture. For instance, in some benchmarks lighttpd is even faster at serving static resources than apache. If you have a separate cluster, you can change your http server there without changing anything else in your app environment.

    I’d start with a 2-machine static resource cluster and see how that performs. That’s another benefit of separating functions – you can scale out only where you need it. As far as synchronizing files, take a look at existing file synchronization tools versus rolling your own. You may find something that does what you need without having to write a line of code.

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

Sidebar

Related Questions

I have a very simple question to ask! I wish to make a website
Very simple question here. I have a double that I wish to convert back
I have simple question. User supplies URL to my PHP script where I fetch
I have simple type Question : public class Question { public string[] Tags {
i have a simple question: i have this var: $v = 24000,1500,1500,1500,1500,1500,; i would
i have a simple question, there is a function with parameter emp_id that opens
I have a simple question: how exactly are array variables such as $_SESSION and
I have a simple question and that is how do you check if an
I have a simple question. I'm trying to get a list of the indicators
I have another simple question about Node. I'm trying to make a simple http

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.