Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Apache (2.4.3) reverse proxy with memcached backend? |
|
Author |
|
mvuk
Joined: 21 Dec 2012 Posts: 8 Location: Germany
|
Posted: Fri 21 Dec '12 15:26 Post subject: Apache (2.4.3) reverse proxy with memcached backend? |
|
|
Currently i am trying to install an Apache 2.4.3 as a caching reverse proxy. I would like to use memcached as my cache backend.
I figured out there is a mod_socache_memcache, which from my understanding, should do exactly that(in combination with mod_cache_socache). So i compiled mod_cache_socache from trunk, loaded mod_cache, mod_cache_socache and mod_socache_memcache, but now i am stuck with the configuration. Here is what i tried:
LoadModule socache_memcache_module modules/mod_cache.so
LoadModule mod_cache_socache modules/mod_cache_socache.so
LoadModule socache_memcache_module modules/mod_socache_memcache.so
<IfModule mod_cache_socache>
<Location />
CacheEnable socache
</Location>
CacheSocache memcache
CacheSocacheMaxSize 102400
CacheSocacheMaxTime 86400
CacheSocacheMinTime 600
CacheReadSize 102400
CacheSocacheReadTime 1000
</IfModule>
The part i don't understand is, where do i configure the path to my memcached instance?
Did i maybe misunderstood the purpose of the modules?
The reason for memcached as chaching backend, is that the machine is a windows machine, and from my understanding mod_cache_disk is not as efficient on a NTFS filesystem as it is on EXT3/4.
Another reason is, that later on there should be a possibility to put a second Reverse Proxy machine which shares the cache with the first one by using the same memcached instance (is that possible at all?).
Thanks |
|
Back to top |
|
covener
Joined: 23 Nov 2008 Posts: 59
|
Posted: Sat 22 Dec '12 5:28 Post subject: |
|
|
if you have trunks mod_cache_socache in your 2.4.x, you would do e.g.
Code: |
CacheSocache memcache:memcache.example.com:12345,memcache2.example.com:12345 |
|
|
Back to top |
|
mvuk
Joined: 21 Dec 2012 Posts: 8 Location: Germany
|
Posted: Wed 26 Dec '12 1:15 Post subject: |
|
|
covener wrote: | if you have trunks mod_cache_socache in your 2.4.x, you would do e.g.
Code: |
CacheSocache memcache:memcache.example.com:12345,memcache2.example.com:12345 |
|
Thanks for the answer, but i still have a problem. I have compiled the trunk version and tried it the way you described, but the server won't start, i get following error:
Unknown socache provider 'memcache'. Maybe you need to load the appropate socache module (mod_socache_memcache?)
But mod_socache_memcache is allready loaded. Here my configuration:
Code: |
LoadModule cache_module modules/mod_cache.so
LoadModule cache_socache_module modules/mod_cache_socache.so
LoadModule socache_memcache_module modules/mod_socache_memcache.so
<IfModule cache_socache_module>
CacheSocache memcache:192.168.1.100:11211
</IfModule>
|
Edit:
Here the mod_info of a linux test machine, trying to do the same:
http://46.163.74.93:88/server-info |
|
Back to top |
|
|
|
|
|
|