Server Clustering?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
0
down vote

favorite












Good afternoon all. I am not sure this is possible but thought I would ask.



I have 2 identical vhosts running Ubuntu 16. Both of those hosts are image download servers. I have roughly 20million images that are being downloaded starting from 1998 to the current year.



My question is this:



Is it possible to request an image file, and have it served from the appropriate server. I don't want both servers downloading the same images. Lets say server 1 is downloading from 2009 to current year, server 2 has 1998 to 2008.



I am already using a proxy server to route requests to the 2 servers, but they are just being routed to images1.domain.com and images2.domain.com.



It would be nice if I could direct my website image requests to images.domain.com and the server containing the actual file respond to the request.



Hopefully I didn't completely botch the asking of this question.










share|improve this question





















  • Do the download paths have some way to identify the year? I mean, if you have /1991/foo/bar/img1.png and /2006/nofoo/nobar/img.png, you could have the proxy server send requests for the first one way and the second the other way. Then one server could keep images from 1998-2008 and the other from 2009-now.
    – muru
    Feb 1 at 1:36










  • There is no year data in the image name. They are named by a unique id asdociated with a property listing
    – Terry Carter
    Feb 1 at 2:18










  • Then split based on characters in the ID or something. Say id begins with a-o, one server, and p-9, other server.
    – muru
    Feb 1 at 2:34










  • In short: no, you cannot do what you suggest. The common way to solve this would either be to have one backend server, and two caching front ends, or simply round robin dns between the two servers, and both having all the content, possibly shared via NFS from a common storage server. Alternatively, in the code that hands out the link, code it such that it gets directed appropriately.
    – vidarlo
    Feb 18 at 12:02














up vote
0
down vote

favorite












Good afternoon all. I am not sure this is possible but thought I would ask.



I have 2 identical vhosts running Ubuntu 16. Both of those hosts are image download servers. I have roughly 20million images that are being downloaded starting from 1998 to the current year.



My question is this:



Is it possible to request an image file, and have it served from the appropriate server. I don't want both servers downloading the same images. Lets say server 1 is downloading from 2009 to current year, server 2 has 1998 to 2008.



I am already using a proxy server to route requests to the 2 servers, but they are just being routed to images1.domain.com and images2.domain.com.



It would be nice if I could direct my website image requests to images.domain.com and the server containing the actual file respond to the request.



Hopefully I didn't completely botch the asking of this question.










share|improve this question





















  • Do the download paths have some way to identify the year? I mean, if you have /1991/foo/bar/img1.png and /2006/nofoo/nobar/img.png, you could have the proxy server send requests for the first one way and the second the other way. Then one server could keep images from 1998-2008 and the other from 2009-now.
    – muru
    Feb 1 at 1:36










  • There is no year data in the image name. They are named by a unique id asdociated with a property listing
    – Terry Carter
    Feb 1 at 2:18










  • Then split based on characters in the ID or something. Say id begins with a-o, one server, and p-9, other server.
    – muru
    Feb 1 at 2:34










  • In short: no, you cannot do what you suggest. The common way to solve this would either be to have one backend server, and two caching front ends, or simply round robin dns between the two servers, and both having all the content, possibly shared via NFS from a common storage server. Alternatively, in the code that hands out the link, code it such that it gets directed appropriately.
    – vidarlo
    Feb 18 at 12:02












up vote
0
down vote

favorite









up vote
0
down vote

favorite











Good afternoon all. I am not sure this is possible but thought I would ask.



I have 2 identical vhosts running Ubuntu 16. Both of those hosts are image download servers. I have roughly 20million images that are being downloaded starting from 1998 to the current year.



My question is this:



Is it possible to request an image file, and have it served from the appropriate server. I don't want both servers downloading the same images. Lets say server 1 is downloading from 2009 to current year, server 2 has 1998 to 2008.



I am already using a proxy server to route requests to the 2 servers, but they are just being routed to images1.domain.com and images2.domain.com.



It would be nice if I could direct my website image requests to images.domain.com and the server containing the actual file respond to the request.



Hopefully I didn't completely botch the asking of this question.










share|improve this question













Good afternoon all. I am not sure this is possible but thought I would ask.



I have 2 identical vhosts running Ubuntu 16. Both of those hosts are image download servers. I have roughly 20million images that are being downloaded starting from 1998 to the current year.



My question is this:



Is it possible to request an image file, and have it served from the appropriate server. I don't want both servers downloading the same images. Lets say server 1 is downloading from 2009 to current year, server 2 has 1998 to 2008.



I am already using a proxy server to route requests to the 2 servers, but they are just being routed to images1.domain.com and images2.domain.com.



It would be nice if I could direct my website image requests to images.domain.com and the server containing the actual file respond to the request.



Hopefully I didn't completely botch the asking of this question.







server apache2 webserver






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Feb 1 at 0:58









Terry Carter

1012




1012











  • Do the download paths have some way to identify the year? I mean, if you have /1991/foo/bar/img1.png and /2006/nofoo/nobar/img.png, you could have the proxy server send requests for the first one way and the second the other way. Then one server could keep images from 1998-2008 and the other from 2009-now.
    – muru
    Feb 1 at 1:36










  • There is no year data in the image name. They are named by a unique id asdociated with a property listing
    – Terry Carter
    Feb 1 at 2:18










  • Then split based on characters in the ID or something. Say id begins with a-o, one server, and p-9, other server.
    – muru
    Feb 1 at 2:34










  • In short: no, you cannot do what you suggest. The common way to solve this would either be to have one backend server, and two caching front ends, or simply round robin dns between the two servers, and both having all the content, possibly shared via NFS from a common storage server. Alternatively, in the code that hands out the link, code it such that it gets directed appropriately.
    – vidarlo
    Feb 18 at 12:02
















  • Do the download paths have some way to identify the year? I mean, if you have /1991/foo/bar/img1.png and /2006/nofoo/nobar/img.png, you could have the proxy server send requests for the first one way and the second the other way. Then one server could keep images from 1998-2008 and the other from 2009-now.
    – muru
    Feb 1 at 1:36










  • There is no year data in the image name. They are named by a unique id asdociated with a property listing
    – Terry Carter
    Feb 1 at 2:18










  • Then split based on characters in the ID or something. Say id begins with a-o, one server, and p-9, other server.
    – muru
    Feb 1 at 2:34










  • In short: no, you cannot do what you suggest. The common way to solve this would either be to have one backend server, and two caching front ends, or simply round robin dns between the two servers, and both having all the content, possibly shared via NFS from a common storage server. Alternatively, in the code that hands out the link, code it such that it gets directed appropriately.
    – vidarlo
    Feb 18 at 12:02















Do the download paths have some way to identify the year? I mean, if you have /1991/foo/bar/img1.png and /2006/nofoo/nobar/img.png, you could have the proxy server send requests for the first one way and the second the other way. Then one server could keep images from 1998-2008 and the other from 2009-now.
– muru
Feb 1 at 1:36




Do the download paths have some way to identify the year? I mean, if you have /1991/foo/bar/img1.png and /2006/nofoo/nobar/img.png, you could have the proxy server send requests for the first one way and the second the other way. Then one server could keep images from 1998-2008 and the other from 2009-now.
– muru
Feb 1 at 1:36












There is no year data in the image name. They are named by a unique id asdociated with a property listing
– Terry Carter
Feb 1 at 2:18




There is no year data in the image name. They are named by a unique id asdociated with a property listing
– Terry Carter
Feb 1 at 2:18












Then split based on characters in the ID or something. Say id begins with a-o, one server, and p-9, other server.
– muru
Feb 1 at 2:34




Then split based on characters in the ID or something. Say id begins with a-o, one server, and p-9, other server.
– muru
Feb 1 at 2:34












In short: no, you cannot do what you suggest. The common way to solve this would either be to have one backend server, and two caching front ends, or simply round robin dns between the two servers, and both having all the content, possibly shared via NFS from a common storage server. Alternatively, in the code that hands out the link, code it such that it gets directed appropriately.
– vidarlo
Feb 18 at 12:02




In short: no, you cannot do what you suggest. The common way to solve this would either be to have one backend server, and two caching front ends, or simply round robin dns between the two servers, and both having all the content, possibly shared via NFS from a common storage server. Alternatively, in the code that hands out the link, code it such that it gets directed appropriately.
– vidarlo
Feb 18 at 12:02















active

oldest

votes











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1001910%2fserver-clustering%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1001910%2fserver-clustering%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

pylint3 and pip3 broken

Missing snmpget and snmpwalk

How to enroll fingerprints to Ubuntu 17.10 with VFS491