Which .NET Memcached client do you use, EnyimMemca

2019-01-12 18:40发布

Seems like both EnyimMemcached (https://github.com/enyim/EnyimMemcached) and BeITMemcached (http://code.google.com/p/beitmemcached/) are popular .NET Memcached libraries. Both are reasonably active projects under development and have over a thousand downloads. Trying to figure out which one to use but found competing remarks! I did read another related post but still want to ask more people on this before making a decision.

EnyimMemcached claims on its project homepage (https://github.com/enyim/EnyimMemcached), that

based on our non-disclosed specially handcrafted in-house performance test we're the fastest C# client ever, using negative amount of system resources, be it memory or CPU time

and

we follow memcached's protocol specification as strictly as no one else: even the memcached guys ask us if they don't understand something

While BeITMemcached claims on its project wiki page (http://code.google.com/p/beitmemcached/wiki/Features) that

We have performed extensive functional testing and performance testing of the BeIT Memcached client and we are satisifed that it is working as it should. When we compared the performance against two other clients, the java port and the Enyim memcached client, our client consumed the least resources and had the best performance. It is also following the memcached protocol specifications more strictly, has the most memcached features, and is still much smaller in actual code size.

So for those who have experience on these or anything similar, which client did you choose to use and possibly why you chose the one you chose?

Thank you,

Ray.

4条回答
不美不萌又怎样
2楼-- · 2019-01-12 19:03

We tested both and found Enyim to perform the best for our expected usage scenario: many (but not millions) cached objects, and millions of cache-get requests (average web site concurrency load = 16-20 requests.)

Our performance factor was measuring the time from making the request to having the object initialized in memory on the calling server. Both libraries would have sustained the job, but the enyim client was preferred in our testing.

查看更多
劳资没心,怎么记你
3楼-- · 2019-01-12 19:04

There is a comparison between Enyim and BeIT at sysdot.wordpress.com/2011/03/08/memcached-clients-which-ones-best/

查看更多
甜甜的少女心
4楼-- · 2019-01-12 19:12

Eniym client's Store() sometimes does not work correctly. It happens when key does not present in cache, for most cases after memcached service restart. This construction:

        T val = _client.Get<T>(key);
        if (val == null)
        {
            // ... filling val variable ...
            var result = _client.Store(StoreMode.Add, key, val);
            // ... result can be false, sometimes ...
        }

works 50/50. T entity is [Serializable].

查看更多
三岁会撩人
5楼-- · 2019-01-12 19:13

I have found Enyim to work the best. It is easy to use, reliable and fast :)

查看更多
登录 后发表回答