Re: Cache question

2019-01-30 Thread Willy Tarreau
Hi Aleks,

On Tue, Jan 29, 2019 at 09:48:08PM +0100, Aleksandar Lazic wrote:
> Hi.
> 
> I plan to use HAProxy 1.9.x cache with ~50-100k Objects which will could use 
> 1-2G RAM.
> 
> Have anyone used the cache features in prod with such specs?

It's used on haproxy.org actually, though with a smaller total size
since we don't have that much content to cache :

   cache cache
total-max-size 50   # size in megabytes
max-object-size 1048576
max-age 900

So we cache objects up to 1 MB with no more than 50 MB total. It works
pretty well :

  http://stats.haproxy.org/

  Cum. HTTP requests:   3379250
  Cache lookups:2520404
  Cache hits:   840542  (33%)

-bash-4.2$ echo show cache | socat - /var/run/haproxy.stats|wc -l
4899
-bash-4.2$ echo show cache | socat - /var/run/haproxy.stats|head -1
0x7facd3bb603a: cache (shctx:0x7facd3bb6000, available blocks:51200)

I could try to enlarge it, but it's not needed there, the goal was
really to give it some real-world exposure.

> The Idea is to use HAProxy in AUS for a Webserver in FR for caching as the
> latency delays the delivery from FR to AUS Clients.

Feel free to try and report your observations, these are always
welcome!

Cheers,
Willy



Cache question

2019-01-29 Thread Aleksandar Lazic
Hi.

I plan to use HAProxy 1.9.x cache with ~50-100k Objects which will could use 
1-2G RAM.

Have anyone used the cache features in prod with such specs?

The Idea is to use HAProxy in AUS for a Webserver in FR for caching as the 
latency delays the delivery from FR to AUS Clients.

Thank you for your answer.

Best regards
Aleks