Awesome, I will post some benchmarking results once we have it. Looking forward
I have 2 follow up questions:
1. Is there any best practices document while using ngx.shared.DICT in
a lua code? (e.g. recommended size of cache, how efficiency of cache
changes with size of cache, etc)
2. We primarily rely on 2 types of cache keys for serving our content.
One of the keys almost always fetch data below 500bytes (But have many
hundred thousands of such keys if not millions) and the other key
fetch data around 5-10Kb (Usually around 10,000 keys). Will there be
any difference in the following two scenerios (we will test them but
logically what do you think)
2.1 if we use a common DICT for both the keys
2.1. If we use a separate DICT (DICT1, DICT2) for the two types of
keys. If we adapt this, can we tune the cache in a way that it
utilizes the key-value size information for faster performance?
Thanks again for help
On 31 May 2012 14:34, agentzh <age...@gmail.com> wrote:
> On Thu, May 31, 2012 at 4:53 PM, Sparsh Gupta <spars...@gmail.com> wrote:
>> I was wondering if there are any benchmarks anyone did comparing
>> ngx.shared.DICT with memcache (single server, accessed over unix
>> sockets). I will probably get my hands dirty but if there are any
>> studies anyone did already, would be interesting to see comparison
> Disclaimer: "only trust what you can test!"
> FWIW, the engineers at the Tencent company (QQ.com) reported 80k q/s
> for ngx_lua + lua-resty-redis versus 120k q/s for ngx_lua +
> ngx.shared_dict for read-only operations.
>> Is ngx.shared.DICT recommended over memcache for speed (response times)
> For the use cases involving lots of reads and much fewer writes, yes.
> For other cases, you'll never know unless you do the benchmark