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

  • Home
  • SEARCH
  • 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 696927
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T03:06:56+00:00 2026-05-14T03:06:56+00:00

So, I have three server, and the idea was to keep all media (images,

  • 0

So, I have three server, and the idea was to keep all media (images, files, movies) on a media server. I never got around to do it but I think I probably should.

So these are the three servers:

WWW server
DB server
Media server

Visitors obviously connect to the WWW server and currently image resizing and cache:ing is done on the WWW servers as the original files are kept there. So the idea for me is for image functions I have, that does all the image compositioning, resizing and cahceing would just pie the command over to the media server that would return ther path to the finnished file.

What I don’t know is how to handle functions such as file_exists() and figuring out image dimensions when needed before even any image management comes into play. Do I pipe all these commands to the other server, via HTTP? I was thinking along the ways of doing it this way:

function image(##ARGS##){
    if ($GLOBALS["media_host"] != "localhost"){
        list ($src, $width, height) = file('http://$GLOBALS[media_host]/imgfunc.php?args=##ARGS##');
        return "<img src='$src' height and width >";
    }
    .... do other stuff here 
}

Am I approaching this the wrong way? Is there a better way to do this?

  • 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-14T03:06:56+00:00Added an answer on May 14, 2026 at 3:06 am

    Imagine the media server as an S3 bucket, would probably make your life easier to understand what should happen where. Install lighthttpd on the media server and serve the images directly from there. For storage, process the image on the main server, upload the image to the media server, store all the info related to the image in the database, so that when you want to serve it, you already have all the info available and you assume for all the right reasons that the image is still there 🙂

    As for the way you want to do it, i think it would cause a serious bottleneck and raise alot of network traffic, you are kind of trying to implement “messages” found in distributed systems and we all know the pitfalls involved there. I say keep it simple!

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

Sidebar

Related Questions

I have three Windows Server 2003 with 2 GB RAM. Server1 tomcat 5.5.25 jvm
I have three solutions which build two clients and a server, and share many
So we have three FLEX controls hosted within a JBOSS server instance, and an
I have the ISPConfig on the VPS server. (Version 3) I have three domains:
I have a three tier system, SQL Server backend, hand written data access layer,
I have installed SQL Server 2005 three times now on the same box. I
I have a MySql Master server replicating to three Slaves. A legacy website is
I have a Microsoft SQL Server 2008 query that returns data from three tables
I'm using SQL Server 2008 and I have a table with three columns: Length
I know this isn't strictly a programming question but y'all must have experienced this.

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.