<div dir="ltr">Using a proxy such as varnish or squid is a key part of the on-demand workflow. Consider this common use case:<br><div><br></div><div>With some type of systems management software, a user initiates a "yum update" or equivalent on 1000 machines at once. They're all the same or similar, so they want to retrieve the same 20 RPMs from Pulp. Pulp has not yet downloaded any of them, so the RPMs are retrieved through the streamer. We would not want pulp to download 1000 copies of each RPM from the remote source. There needs to be some way to de-duplicate the requests, so Pulp only downloads each RPM once. We also don't want to keep HTTP requests waiting while the download completes (what if it takes a long time?), so as bytes are retrieved from that one remote download, we want them streamed out to each of the 1000 clients.</div><div><br></div><div>This is a complex and specialized problem to solve, especially when you are handling requests in multiple processes across multiple machines. Squid and varnish are great at solving this particular problem, so we use them to do so.</div><div><br></div><div>On the graphic at the link below, you can see the de-duplication shown as " many requests ---> [ squid cache ] ---> one request"</div><div><br></div><div><a href="http://pulp.readthedocs.io/en/2.8-release/user-guide/deferred-download.html">http://pulp.readthedocs.io/en/2.8-release/user-guide/deferred-download.html</a><br></div><div><br></div><div>Hopefully that's helpful. Let me know if more explanation on anything would make it more clear.</div><div><br></div><div>Michael</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 11, 2016 at 3:56 AM, Lutchy Horace (Mailing List) <span dir="ltr"><<a href="mailto:mailinglist.subscriptions@lhprojects.net" target="_blank">mailinglist.subscriptions@lhprojects.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Wed, 11 May 2016 01:16:18 -0400<br>
"Lutchy Horace (Mailing List)"<br>
<span class=""><<a href="mailto:mailinglist.subscriptions@lhprojects.net">mailinglist.subscriptions@lhprojects.net</a>> wrote:<br>
<br>
> Hello,<br>
><br>
> To avoid flooding the mailing list with multiple E-Mails, I'll<br>
> be collapsing a few questions into one E-Mail.<br>
><br>
> 1. I had assumed a completed sync task meant it pulled remote packages<br>
> onto the pulp server. The documentation isn't quite clear on this<br>
> subject because this does not seem to be the case?<br>
><br>
> 2. Going through bug reports in regards to download policies, the<br>
> picture is clearer regarding immediate and on_demand policies but<br>
> quite vague about what background policy do?<br>
><br>
> 3. Do you really need to download content units onto the pulp server?<br>
>       3.a. If not, how does this work? Does consumers contact the<br>
>       origin servers directly?<br>
>       3.b. If yes, what is difference of scheduling a sync task and<br>
>       not a "download" task?<br>
><br>
> Regards<br>
><br>
<br>
</span>While resolving an entirely different issue regarding pulp, I stumbled<br>
on <a href="https://media.readthedocs.org/pdf/pulp/stable/pulp.pdf" rel="noreferrer" target="_blank">https://media.readthedocs.org/pdf/pulp/stable/pulp.pdf</a> and<br>
<a href="http://pulp.readthedocs.io/en/latest/user-guide/deferred-download.html" rel="noreferrer" target="_blank">http://pulp.readthedocs.io/en/latest/user-guide/deferred-download.html</a>.<br>
Which elaborates a bit more on what each download policy actually does.<br>
So far, I've installed python-pulp-streamer and varnish on the same<br>
box, although I am bit confuse as to why I would need an additional<br>
'Reverse Proxy' in the stack. That at least fixes the 'No more mirrors<br>
left to try' problem I was facing on consumers.<br>
<div class="HOEnZb"><div class="h5"><br>
Regards<br>
<br>
--<br>
Lutchy Horace<br>
Owner/Operator/Administrator [<a href="http://www.lhprojects.net" rel="noreferrer" target="_blank">http://www.lhprojects.net</a>]<br>
Owner/Operator/Administrator [<a href="http://www.bombshellz.net" rel="noreferrer" target="_blank">http://www.bombshellz.net</a>]<br>
Owner/Operator/Administrator [<a href="http://www.animehouse.club" rel="noreferrer" target="_blank">http://www.animehouse.club</a>]<br>
About Me [<a href="http://about.me/lhprojects" rel="noreferrer" target="_blank">http://about.me/lhprojects</a>]<br>
USA<br>
<br>
_______________________________________________<br>
Pulp-list mailing list<br>
<a href="mailto:Pulp-list@redhat.com">Pulp-list@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/pulp-list" rel="noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/pulp-list</a><br>
</div></div></blockquote></div><br></div>