Is memcached really faster than MySQL on very simple query?
Greg Whalin
gwhalin at meetup.com
Thu Jul 13 19:40:22 UTC 2006
Perrin Harkins wrote:
> On Thu, 2006-07-13 at 11:02 -0400, Greg Whalin wrote:
>> I never considered the benefit to memcached as being a store that is
>> faster than our db. The true benefit to memcached shows when you have
>> to scale your app beyond a single unloaded db. DB machines are
>> expensive. Memcache machines are cheap. DB environment can be hairy to
>> scale. Memcached is easy to scale.
>
> It's not so hard to replicate MySQL for read-only queries across
> multiple machines. Memcached should handle concurrency better though,
> since it doesn't need to dedicate a thread to each connection.
In our experience, a DB node is about 10 times the cost as a memcached
server. Also, rolling out a new DB is way more involved than rolling
out a new memcached node (simple enough server that we run them diskless
and netboot them).
>
>> I also see little benefit to using memcached as a query cache. We use
>> it as an object cache. We have objects that require several sql queries
>> to build, so serializing them and shoving them in cache is a huge win
>> for us.
>
> Caching at a higher level is a bigger win, but query caching will
> definitely help some systems.
Agreed.
More information about the memcached
mailing list