From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: Yet another Hydra mirror: hydra-mirror.marusich.info Date: Wed, 09 Mar 2016 13:42:36 +0100 Message-ID: <87fuvzesar.fsf@gnu.org> References: <87a8m9jx0z.fsf@gmail.com> <87vb4xnxhl.fsf@gnu.org> <87y49s6opb.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36892) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1addRr-0006R5-MQ for guix-devel@gnu.org; Wed, 09 Mar 2016 07:42:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1addRn-0006Fq-MT for guix-devel@gnu.org; Wed, 09 Mar 2016 07:42:43 -0500 In-Reply-To: <87y49s6opb.fsf@gmail.com> (Chris Marusich's message of "Wed, 09 Mar 2016 00:27:28 -0800") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Chris Marusich Cc: guix-devel@gnu.org Chris Marusich skribis: > No, I'm not using that at the moment. In the future, if I set up any > nginx servers to accomplish the same task, I will definitely use it. I > would prefer to run my own servers, but for now this is something I can > do immediately to help the project, so I decided to do it. > > CloudFront is a service, so you use its API (or the AWS Management > Console, which is a web UI for the API) to create a "distribution" and > configure it to use hydra.gnu.org as its "origin". A little extra work > is required to glue everything together. For example, I had to create a > CNAME pointing from hydra-mirror.marusich.info to > d2xj50ygrk34qq.cloudfront.net, which is the canonical name of my > distribution. Once it's configured, all requests sent to > hydra-mirror.marusich.info are serviced by a nearby point of presence in > the CloudFront content distribution network, and the results are cached. OK. Do you know exactly how much is cached? Also, when does caching happen? When using nginx as a proxy as on mirror.guixsd.org, it fetches things lazily, so on a cache miss it goes connect to hydra.gnu.org. > I've noticed that Hydra does not include cache-related headers (e.g., > Cache-Control). Perhaps for this reason, the nginx config you linked > seems to pick arbitrary caching settings. When using CloudFront, a > distribution can be configured to respect the Cache-Control headers sent > by the origin server. Does nginx provide similar functionality? Would it > make sense to have hydra.gnu.org return such headers? Dunno, maybe! Maybe we could tell nginx to add such headers? What would be the right thing? > For now, I've configured hydra-mirror.marusich.info to cache all > successful requests for 1 week, and to respect cache-related headers > from the hydra.gnu.org if it ever decides to send them. This seemed like > a reasonable configuration for data which is not expected to change. Yeah, mirror.guixsd.org also caches for one week now. I wasn=E2=80=99t sur= e how much disk space that would represent, but so far we=E2=80=99re around 10G, = so increasing to 1 week seemed reasonable. Thanks, Ludo=E2=80=99.