[Apt-cacher-ng-users] Client fallback to other proxy or to main repo in case of unresponsive proxy?

Bolesław Tokarski boleslaw.tokarski at tieto.com
Thu Nov 21 11:30:27 UTC 2013


Hello, Nicola,

I guess that all of your solutions should work, though not all of them
"feel" right. I.e. a most commonly used loadbalancer is something you
would need to set up under a particular IP address and then there's no
benefit of having a multi-site fallback.

I also have a multiple site setup for our Ubuntu workstations. It comes
as a special challenge: not only we need to take into account that one
of the servers can be down, but also that a laptop might be roaming to a
different site and that it doesn't make sense to download from the
former one.

Added to that, we also need to allow the machines to download packages
from the Internet if they're outside office.

Our current setup might seem complex, but is totally explained by the
fact that we manage more than just package repositories.

First of all, we use CFEngine to manage the configuration of the
machines. It can detect if it has access to its server, otherwise it
guesses it is outside the company. Once it contacts the server we
provide a mapping between the IP range and the site the machine is
currently in (taken from AD sites and services with some local
overrides). CFEngine changes the proxy used in apt.conf.d/proxy-config.

As mostly we are well aware if one of the proxies went berserk, we just
let the server know the proxy is not there so it reconfigures all
machines to use the next nearest proxy.

Although the solution is not exactly 'scripting', but I guess it falls
to this category.

Otherwise, I guess you could set up a CGI script on an arbitrary server
that would redirect incoming requests (not proxy, I mean a HTTP
Redirect) based on the incoming IP address and the apt-cacher-ng
availability in particular site.

Cheers,
Ballock

On 04/11/13 16:14, Nicola Volpini wrote:
> Hi,
>
> I have a setup with multiple sites across different geographic areas. Right now we have a single repo in Sweden and all the sites are fetching packages from it, with obvious problems (speed, bandwidth, etc.)
> I'd like to setup two deb proxies with apt-cacher-ng per site.
>
> How can I achieve some sort of redundancy on each client? I'd like to configure them so they can attempt to contact proxy1.site, then proxy2.site, then fallback to the main repo.
> I realise it's not something apt-cacher-ng should really care about but I'd like to know how you're solving this in your setups. Loadbalancer? DNS views? Clever scripting? :)
>
> Thanks,
> Nicola
>
>
> --
> Nicola Volpini
> Infrastructure Operations Engineer
>
> Kambi Sweden AB
> Wallingatan 2
> 111 60 Stockholm
> Mob: +46739208979
>
>
> CONFIDENTIALITY NOTICE: This email message (and any attachment) is intended only for the individual or entity to which it is addressed. The information in this email is confidential and may contain information that is legally privileged or exempt from disclosure under applicable law. If you are not the intended recipient, you are strictly prohibited from reading, using, publishing or disseminating such information and upon receipt, must permanently delete the original and destroy any copies. We take steps to protect against viruses and other defects but advise you to carry out your own checks and precautions as Kambi does not accept any liability for any which remain. Thank you for your co-operation.
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://lists.alioth.debian.org/pipermail/apt-cacher-ng-users/attachments/20131104/56f7297d/attachment.html>
>




More information about the Apt-cacher-ng-users mailing list