Topic: memcached-1.4.5-repcached-2.3

Hi Remi,

Just wondering if it would be possible to please ask you to provide a custom memcached 1.4.5 RPM for RHEL5 x64 with repcached 2.3 patch built in.

Basically, I managed to get as far as the following:

1. Install libevent-devel
2. Get patch:
3. Get memcached-1.4.5 source
4. Patch the source with "patch -p1 -i repcached-2.3-1.4.5.patch"
4. ./configure --enable-replication
5. make
6. make install

As as a result, the binary ends up in /usr/local/bin

It would be great if this could be obtained via an RPM package with all the necessary start / stop scripts etc. Unfortunately, I have no experience with building packages myself.

Any help would be greatly appreciated!

Re: memcached-1.4.5-repcached-2.3

I understand that replication is usefull. Except if the client is already aware of this, like ones which use libmencached, p.e. php-pecl-memcache)

But I don't understand why this feature have been developed as a patch and have not be proposed to upstream.

I will have a look, try a build, and perhaps make rpm available. J
Just wrote this on my very long TODO list.


Laptop:  Fedora 40 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: AlmaLinux 8 with EPEL, rpmfusion, remi

Re: memcached-1.4.5-repcached-2.3

Thanks for reply - the problem is that the current latest version of the extension pecl-memcached does support replication as a client feature. You can have consistent key distribution and some sort of failover, but it seems that its not true replication. For example:

- Two memcached servers M1 and M2
- Use consistent key distribution in pecl-memcached
- Save data - both M1 and M2 have it
- Take M1 down
- Client reads / writes data from / to M2
- Take M1 up, take M2 down
- Client fails - still tries to read from M2 as it marked M1 as dead before

That's why one has to fiddle with this repcached patch to get this happening behind the scenes and not worry about trying to mimic this behaviour on the client.

Unfortunately, it only supports 2-node replication (master-master) at this point, but it's still better than nothing.