<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:p="urn:schemas-microsoft-com:office:powerpoint" xmlns:a="urn:schemas-microsoft-com:office:access" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema" xmlns:b="urn:schemas-microsoft-com:office:publisher" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" xmlns:c="urn:schemas-microsoft-com:office:component:spreadsheet" xmlns:oa="urn:schemas-microsoft-com:office:activation" xmlns:html="http://www.w3.org/TR/REC-html40" xmlns:q="http://schemas.xmlsoap.org/soap/envelope/" xmlns:D="DAV:" xmlns:x2="http://schemas.microsoft.com/office/excel/2003/xml" xmlns:ois="http://schemas.microsoft.com/sharepoint/soap/ois/" xmlns:dir="http://schemas.microsoft.com/sharepoint/soap/directory/" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:dsp="http://schemas.microsoft.com/sharepoint/dsp" xmlns:udc="http://schemas.microsoft.com/data/udc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sps="http://schemas.microsoft.com/sharepoint/soap/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:udcxf="http://schemas.microsoft.com/data/udc/xmlfile" xmlns:wf="http://schemas.microsoft.com/sharepoint/soap/workflow/" xmlns:mver="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns:mrels="http://schemas.openxmlformats.org/package/2006/relationships" xmlns:ex12t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:ex12m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<title>RE: Windows version of Memcached</title>
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.EmailStyle18
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:"Arial","sans-serif";
        color:navy;}
span.EmailStyle20
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle21
        {mso-style-type:personal;
        font-family:"Arial","sans-serif";
        color:navy;}
span.EmailStyle22
        {mso-style-type:personal;
        font-family:"Arial","sans-serif";
        color:navy;}
span.EmailStyle23
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Thanks Tormod.<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>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?<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<div>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:#1F497D'>Best,</span><span style='color:#1F497D'><o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:#1F497D'>Peter</span><span style='color:#1F497D'><o:p></o:p></span></p>
</div>
<p class=MsoNormal><span style='color:#1F497D'> </span><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p></o:p></span></p>
<div>
<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'>
<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Tormod Hystad
[mailto:thy@komplett.no] <br>
<b>Sent:</b> Sunday, September 30, 2007 6:21 PM<br>
<b>To:</b> Peter Chiu; memcached<br>
<b>Subject:</b> RE: Windows version of Memcached<o:p></o:p></span></p>
</div>
</div>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><span lang=NO-BOK style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:navy'>A bit of an abrupt end on the last email, sorry.<o:p></o:p></span></p>
<p class=MsoNormal><span lang=NO-BOK style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:navy'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=NO-BOK style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:navy'>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.<o:p></o:p></span></p>
<p class=MsoNormal><span lang=NO-BOK style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:navy'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=NO-BOK style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:navy'>Search the mailing list for ”consistent hashing” and you’ll get
some good discussions about this. <o:p></o:p></span></p>
<p class=MsoNormal><span lang=NO-BOK style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:navy'><o:p> </o:p></span></p>
<div>
<p class=MsoNormal><span lang=NO-BOK style='color:navy'> <o:p></o:p></span></p>
<p class=MsoNormal><span lang=NO-BOK style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:navy'>- Tormod</span><span lang=NO-BOK style='color:navy'><o:p></o:p></span></p>
<p class=MsoNormal><span lang=NO-BOK style='color:navy'> <o:p></o:p></span></p>
<p class=MsoNormal><span lang=NO-BOK style='color:navy'> </span><span
lang=NO-BOK><o:p></o:p></span></p>
</div>
<div>
<div class=MsoNormal align=center style='text-align:center'>
<hr size=2 width="100%" align=center>
</div>
<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>
memcached-bounces@lists.danga.com [mailto:memcached-bounces@lists.danga.com] <b>On
Behalf Of </b>Tormod Hystad<br>
<b>Sent:</b> 30. september 2007 12:07<br>
<b>To:</b> Peter Chiu; memcached<br>
<b>Subject:</b> RE: Windows version of Memcached</span><o:p></o:p></p>
</div>
<p class=MsoNormal><span lang=NO-BOK><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=NO-BOK style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:navy'>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”).<o:p></o:p></span></p>
<p class=MsoNormal><span lang=NO-BOK style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:navy'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=NO-BOK style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:navy'>Then access the servers from your code with the client of your
choice. From windows ”client” machines we’ve used a java client (</span><span
lang=NO-BOK style='font-family:"Arial","sans-serif"'><a
href="http://www.whalin.com/memcached/">http://www.whalin.com/memcached/</a></span><span
lang=NO-BOK style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:navy'>) and the Enyim C# (</span><span lang=NO-BOK
style='font-family:"Arial","sans-serif"'><a
href="http://www.codeplex.com/EnyimMemcached/">http://www.codeplex.com/EnyimMemcached/</a>)
</span><span lang=NO-BOK style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:navy'>client with no problems and good performance against the Win32
memcached, <o:p></o:p></span></p>
<p class=MsoNormal><span lang=NO-BOK style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:navy'><o:p> </o:p></span></p>
<div>
<p class=MsoNormal><span lang=NO-BOK style='color:navy'> <o:p></o:p></span></p>
<p class=MsoNormal><span lang=NO-BOK style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:navy'>- Tormod</span><span lang=NO-BOK style='color:navy'><o:p></o:p></span></p>
<p class=MsoNormal><span lang=NO-BOK style='color:navy'> <o:p></o:p></span></p>
<p class=MsoNormal><span lang=NO-BOK style='color:navy'> </span><span
lang=NO-BOK><o:p></o:p></span></p>
</div>
<div>
<div class=MsoNormal align=center style='text-align:center'>
<hr size=2 width="100%" align=center>
</div>
<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Peter Chiu
[mailto:peterchiu@jobsdb.com] <br>
<b>Sent:</b> 30. september 2007 12:03<br>
<b>To:</b> Tormod Hystad; memcached<br>
<b>Subject:</b> RE: Windows version of Memcached</span><o:p></o:p></p>
</div>
<p class=MsoNormal><span lang=NO-BOK><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Thanks Tormod. I apologize for the confusion. He’s what I meant:<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>The documentation at <a href="http://www.danga.com/memcached/">http://www.danga.com/memcached/</a>
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..<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<div>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:#1F497D'>Best,</span><span style='color:#1F497D'><o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:#1F497D'>Peter</span><span style='color:#1F497D'><o:p></o:p></span></p>
</div>
<p class=MsoNormal><span style='color:#1F497D'> </span><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p></o:p></span></p>
<div>
<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'>
<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Tormod Hystad
[mailto:thy@komplett.no] <br>
<b>Sent:</b> Sunday, September 30, 2007 5:48 PM<br>
<b>To:</b> Peter Chiu; memcached<br>
<b>Subject:</b> RE: Windows version of Memcached<o:p></o:p></span></p>
</div>
</div>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal style='margin-bottom:12.0pt'><span lang=EN-GB
style='font-size:10.0pt;font-family:"Arial","sans-serif";color:navy'>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. :-)<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-GB style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:navy'>To install as a service run “memcached.exe -d install”, documented
at <a href="http://jehiah.cz/projects/memcached-win32/"
title="http://jehiah.cz/projects/memcached-win32/">http://jehiah.cz/projects/memcached-win32/</a>
or see “memcached.exe –h” for help. <o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-GB style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:navy'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-GB style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:navy'>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:<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-GB style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:navy'>"C:\servers\memcached-1.2.1-win32\memcached.exe" -d
runservice -p 11911 -l 192.168.xx.yyy -m 1024<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-GB style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:navy'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-GB style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:navy'>And restart the service.<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-GB style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:navy'>Those are my values, you should use your own preferred path, ports,
memory and ip-addresses, of course.<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-GB style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:navy'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=NO-BOK style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:navy'><o:p> </o:p></span></p>
<div>
<p class=MsoNormal><span lang=NO-BOK style='color:navy'> <o:p></o:p></span></p>
<p class=MsoNormal><span lang=NO-BOK style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:navy'>- Tormod</span><span lang=NO-BOK style='color:navy'><o:p></o:p></span></p>
<p class=MsoNormal><span lang=NO-BOK style='color:navy'> <o:p></o:p></span></p>
<p class=MsoNormal><span lang=NO-BOK style='color:navy'> </span><span
lang=NO-BOK><o:p></o:p></span></p>
</div>
<div>
<div class=MsoNormal align=center style='text-align:center'>
<hr size=2 width="100%" align=center>
</div>
<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>
memcached-bounces@lists.danga.com [mailto:memcached-bounces@lists.danga.com] <b>On
Behalf Of </b>Peter Chiu<br>
<b>Sent:</b> 29. september 2007 20:53<br>
<b>To:</b> Robert Brewer; memcached<br>
<b>Subject:</b> RE: Windows version of Memcached</span><o:p></o:p></p>
</div>
<p class=MsoNormal><span lang=NO-BOK><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Great thanks!<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>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?<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<div>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:#1F497D'>Best,</span><span style='color:#1F497D'><o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:#1F497D'>Peter</span><span style='color:#1F497D'><o:p></o:p></span></p>
</div>
<p class=MsoNormal><span style='color:#1F497D'> </span><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p></o:p></span></p>
<div>
<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'>
<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Robert Brewer
[mailto:fumanchu@aminus.org] <br>
<b>Sent:</b> Sunday, September 30, 2007 1:49 AM<br>
<b>To:</b> Peter Chiu; memcached<br>
<b>Subject:</b> RE: Windows version of Memcached<o:p></o:p></span></p>
</div>
</div>
<p class=MsoNormal><o:p> </o:p></p>
<p><span style='font-size:10.0pt'>Peter Chiu wrote:<br>
> I am running Windows version of Memcached. I read somewhere that<br>
> ePoll/LibEvent will speed things up in Linux. Do I need them for<br>
> Windows?<br>
><br>
> Or is everything I need included in "memcached 1.2.1 for Win32<br>
> binaries (Dec 23, 2006)" from the following link?<br>
> <a href="http://jehiah.cz/projects/memcached-win32/">http://jehiah.cz/projects/memcached-win32/</a><br>
<br>
That binary worked for me. No other software needed.<br>
<br>
<br>
Robert Brewer<br>
fumanchu@aminus.org</span> <o:p></o:p></p>
</div>
</body>
</html>