-1

we have 3 servers which are in load balancer.Whenever I'm saving a image it saves only in one server I want to access that image from whenever I call the load balancer url? Can any one please advise me how to achieve this?

Barett
  • 5,826
  • 6
  • 51
  • 55
Lax_me
  • 307
  • 1
  • 7
  • 20
  • 1
    Wouldn't using a common folder introduce a 'single point of failure' and defeat the purpose of using load balancing? IMO you should focus on a process to copy images to all three servers instead. – Pierre-Luc Pineault Mar 25 '15 at 17:58
  • Unfortunately, this isn't a programming question. ServerFault or SuperUser would be better forums for this question. – Barett Mar 25 '15 at 18:22

1 Answers1

1

I would recommend against saving images on your actual web servers. Instead, find a centralized solution, possibly using something like AWS or Azure storage, which would give you the ability to safely store your uploads somewhere without depending on your local filesystem. You can configure these storage accounts so that the files are publicly accessible or not, depending on what you're doing with them.

If you have to use a local filesystem, it should be something shared, like a file server on your network that is designed to be accessed from multiple servers. But AWS and Azure storage is ridiculously cheap (a few cents per GB per month).

Joe Enos
  • 39,478
  • 11
  • 80
  • 136