Trying to understand Memcached

Dec 15, 2008 at 5:17 AM
Sorry for asking beginner questions but I need help to understand Memcached and this implementation:

(1) What does a daemom do? I do not see a Memcached daemom here, is it that the functionality is already included in ASP.NET execution when we add stuffs to web.config?

(2) What is a memcached server?

(3) When we add items to cache, are they distributed among the servers listed in web.config?
memcached>
   <servers>
    <!-- put your own server(s) here-->
    <add address="192.168.0.1" port="11211"/>
    <add address="192.168.0.2" port="11211"/>
   </servers>
   <socketPool minPoolSize="10" maxPoolSize="100" connectionTimeout="00:00:10" deadTimeout="00:02:00"/>
  </memcached>

If so, what will happen if one of the machine is down? Would part of the cache be gone? Shouldn't it be that the cache are kept on all machines and synchronized?

Are there any article, samples or tutorial on using Memcached?

Thanks.
Coordinator
Dec 15, 2008 at 2:01 PM
Hi pxbar,
Hey no need to be sorry about.

1. Daemon is a linux equilvaent of a Windows Service. Memcache for windows can be run as a service.

2. Memcached is a high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load.

Danga Interactive developed memcached to enhance the speed of http://LiveJournal.com, a site which was already doing 20 million+ dynamic page views per day for 1 million users with a bunch of webservers and a bunch of database servers. Memcached dropped the database load to almost nothing, yielding faster page load times for users, better resource utilization, and faster access to the databases on a memcache miss.

3. Yes they are distributed among two servers. When one goes down that data is lost. However, this is not true for Session State Provider as it has a SQL Server backup for session database.
For detailed understanding of memcached please review the following
http://www.socialtext.net/memcached/index.cgi?faq
http://www.socialtext.net/memcached/index.cgi?this_is_a_story_of_caching ( Please do read this one for a clear concept for memcached)

Hope this helps ;)
Thanks,
Fahad