Windows version of Memcached

Peter Chiu peterchiu at jobsdb.com
Mon Oct 1 01:34:23 UTC 2007


Thanks Tormod.

 

Let's say we have multiple Memcached servers and one of them dies. What
is the proper way of handling the situation? Should the clients'
memcached server list configuration be changed to have the dead
memcached server removed? Or should we plug in another new Memcached
server to replace the dead one?

 

Best,

Peter

 

From: Tormod Hystad [mailto:thy at komplett.no] 
Sent: Sunday, September 30, 2007 6:21 PM
To: Peter Chiu; memcached
Subject: RE: Windows version of Memcached

 

A bit of an abrupt end on the last email, sorry.

 

The magic of distribution in memcached happens in the client, when it
hashes the keys and decides which server to store/retrieve the value
from, so the various servers do not even know about each other. This
also explains an important charateristic of memcached, no replication of
any kind, so if a server dies, all the data cached on it dies with it.
It is up to the client to handle this in a sensible manner. They handle
it by adjsuting what servers they map the different key hashes to, so
the cached data is gradually rebuilt.

 

Search the mailing list for "consistent hashing" and you'll get some
good discussions about this. 

 

 

- Tormod

 

 

________________________________

From: memcached-bounces at lists.danga.com
[mailto:memcached-bounces at lists.danga.com] On Behalf Of Tormod Hystad
Sent: 30. september 2007 12:07
To: Peter Chiu; memcached
Subject: RE: Windows version of Memcached

 

Sure you can, no problem at all, just install the memcached service on
as many machines as you want and modify the service on each machine as I
described below (memory to use, port to listen on and so on, see
"memcached.exe -h").

 

Then access the servers from your code with the client of your choice.
>From windows "client" machines we've used a java client
(http://www.whalin.com/memcached/) and the Enyim C#
(http://www.codeplex.com/EnyimMemcached/) client with no problems and
good performance against the Win32 memcached, 

 

 

- Tormod

 

 

________________________________

From: Peter Chiu [mailto:peterchiu at jobsdb.com] 
Sent: 30. september 2007 12:03
To: Tormod Hystad; memcached
Subject: RE: Windows version of Memcached

 

Thanks Tormod. I apologize for the confusion. He's what I meant:

 

The documentation at http://www.danga.com/memcached/ says, "First, you
start up the memcached daemon on as many spare machines as you have." I
was just wondering if I can do the same in the Windows environment so as
to provide load-balanced, distributed caching..

 

Best,

Peter

 

From: Tormod Hystad [mailto:thy at komplett.no] 
Sent: Sunday, September 30, 2007 5:48 PM
To: Peter Chiu; memcached
Subject: RE: Windows version of Memcached

 

I'm not exactly sure I understand your question, but if you mean
installing several memcached Win32 services on a single box on different
ports, I've not actually tried that, but I did figure out how to change
the port, memory and other settings for a service install, hope this
gets you in the right direction. :-)

To install as a service run "memcached.exe -d install", documented at
http://jehiah.cz/projects/memcached-win32/ or see "memcached.exe -h" for
help. 

 

Then change the registry settings for the memcached service, in
HKEY_Local_Machine/System/CurrentControlSet/Services/ memcached Server.
Change the ImagePath key to something like:

"C:\servers\memcached-1.2.1-win32\memcached.exe" -d runservice -p 11911
-l 192.168.xx.yyy -m 1024

 

And restart the service.

Those are my values, you should use your own preferred path, ports,
memory  and ip-addresses, of course.

 

 

 

- Tormod

 

 

________________________________

From: memcached-bounces at lists.danga.com
[mailto:memcached-bounces at lists.danga.com] On Behalf Of Peter Chiu
Sent: 29. september 2007 20:53
To: Robert Brewer; memcached
Subject: RE: Windows version of Memcached

 

Great thanks!

 

I couldn't find any instructions for setting up the Windows version with
multiple memcached servers. Could you please kindly share any pointers
or info?

 

Best,

Peter

 

From: Robert Brewer [mailto:fumanchu at aminus.org] 
Sent: Sunday, September 30, 2007 1:49 AM
To: Peter Chiu; memcached
Subject: RE: Windows version of Memcached

 

Peter Chiu wrote:
> I am running Windows version of Memcached. I read somewhere that
> ePoll/LibEvent will speed things up in Linux. Do I need them for
> Windows?
>
> Or is everything I need included in "memcached 1.2.1 for Win32
> binaries (Dec 23, 2006)" from the following link?
> http://jehiah.cz/projects/memcached-win32/

That binary worked for me. No other software needed.


Robert Brewer
fumanchu at aminus.org 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.danga.com/pipermail/memcached/attachments/20071001/ed637555/attachment.htm


More information about the memcached mailing list