memcached

Reading data from memcache sometimes fails

I've written a gevent-based program that allows its web clients to quickly exchange messages through it (so it works like a hub). Since I only support polling mechanism at this moment, I've written it to store messages that need to be delivered to a specific client in its 'inbox' at the server side. While the client list is stored in My...

fastest way to persist changes

hi, in my web app the database has a blob(an xml file). The user is allowed to change the blob through a web interface. I take the blob show it in a html form, then the user can change some values and save it back. So the user submit request has a db save. Can I save the entry to a cache to speed up the submit request? But then there is ...

Memcache clustering for php sessions ?

Hello, Here's a little background, currently i have 3 web servers one db server which also host memcache for php sessions for the 3 web servers. I have the php configs on the 3 servers to point to the memcache server for sessions. It was working fine until alot of connections were being produced for reads etc, which then caused conn...

What kind of Http proxy do I need?

So, I have a website that is served by 12 separate application servers without any shared cache. We use a third party webservice to implement a particular functionality in the app. However, the 3rd party doesn't want us to be calling them a lot lest it breaks their site. Hence I am thinking of keeping some kind of a proxy in between th...

Memcached vs. HW Load Balancer w/sticky sessions

All, I've been doing some research on when (and when not) to use Memcached. I'm familiar with distributed caching in terms of it's core objectives. Using Memcacached/similar makes sense to me if you've got a few servers...as it would give you central virtual repository to get your cached data. That said, if you have a hardware load ...

How to upgrade drupal modules?

In my case I'm upgrading the memcache module,though there's a README.txt but it seems not operable : 1. Install the memcached binaries on your server. See http://www.lullabot.com/articles/how_install_memcache_debian_etch 2. Install the PECL memcache extension for PHP. This must be version 2.2.1 or higher or you will experience errors. 3...

Seg Faults trying to run Memcached?

I'm having tons of problems with Memcached. It seems to be installed fine locally, I can run the command 'memcached -vv' and see that it's listening. I'm deploying to Heroku (which has this section: http://docs.heroku.com/memcache on using memcached) and definitely have the memcached add-on installed. Here's how my environment is set up:...

How to prevent memcache storing an incomplete page when someone clicks away prior to page load completion?

I'm fairly new to memcache so apologies if this is an obvious one. I have looked through the memcached documentation and tried various Google searches but to no avail. The setup : Drupal 6.19 Memcache API and integration module Authcache module Centos 5 Memcached 1.2.6 If you need further information let me know. The situation : M...

What is the minimum/ideal memcached stack for a dedicated memcached virtual cluster

Currently I am considering: VMWare Hypervisor ESXi CentOS 5.5 Memcached 1.4.5 and dependencies That is ALL. Is there anything else I need/any substitutions? ...

How can I secure memcached/beanstalkd in a hostile cloud environment?

Here's how my servers (in Amazon EC2) would look like: Server 1 Server 2 Server 3 __________________________ _____________________ _______________ | Cloud Monitor Daemon | | Memcached daemon | | beanstalkd | | | | Memcached daemon | ____...

Memcache for pagination

This feels like a really bad idea on implementation and I'm not sure of the speed savings given the potential cost in memory. Using Dalli and Memecache to store a set of data that gets pulled on every page request that needs to be paginated. Its a lot of data so I'd really rather not keep hitting the database if possible, but I also don...

How does using updated_at in your memcached key avoid DB hits?

While reading up on caching options for Rails, I've just watched the Scaling Rails episode on memcached, where they advocate using the updated_at field of a record as part of the cache key. This is supposed to ensure that when a cache block contains the contents of a record, whenever that record gets updated, it will invalidate that cach...

How to measure the size of a Ruby object?

Hi, I'm having Memcache problems and I was wondering what is the best way to know how big the objects I create are. The only solution I have is to put them into Memcache which display their size in bytes (by the way, can I customize Memcache's output? I want readable kilobytes…). Thank you, Kevin ...

Memcache - Local or Dedicated Server?

What are the pros and cons of having memcached running on a seperate server instead of locally? This is my server setup: -2 Dedicated Servers (Load Balanced) -1 Dedicated MySQL Server -1 Dedicated Memcached Server Is there any benefit of dropping the Memcached Server and putting the daemon locally on the 2 dedicated servers? Or is that...

With RoR, what's the best place/layer to put your memcache login in?

With RoR, you have your model, controller and view. The model has both class properties etc., and db access code mingled in. In your controllers, you use your models to fetch certain data to push to your views. In the Java world, you would have a DAO per entity, and then a 'Service' layer where you could decide to pull the object from...

Django i18n internationalization and memcached

I'm trying to set up memcached on a django project on which I'm using the i18n internationalization system. Sadly, it looks that memcached is not caching different versions of the same page according to the language. In facts, when I switch language, it gets the previous cached page, without caring about the language switch. I'm using...

Problem to find all cache keys our memory by using Memcached

Hi Friends, I am using Memcached for implementing distributed cache. The Library that i used for it is Enyim.Caching. With the help of its great documents I've furnished all my requirements. But i am not be able to find all cache key in the memory. With the help of System.Web.Caching i am doing for the same requirement as. #region ...

Manipulating ActiveRecords using only a few attributes with Ruby on Rails

Hi, For caching matters, I'm caching an array of the attributes of the objects I need: friends = [{:id => 4, :name => "Kevin"}, {:id => 12, :name => "Martin"}, …] Is it possible to have a list of Users using this array, so that I can use Ruby methods? For instance, I usually get a list of non-friends with this: non_friends = User.al...

Best way to keep an activity log in memcached

I'd like to build a "feed" for recent activity related to a specific section of my site. I haven't used memcache before, but I'm thinking of something like this: When a new piece of information is submitted to the site, assign a unique key to it and also add it to memcache. Add this key to the end of an existing list in memcache, so i...

Nested memcache lookups in Python, o(n) good/bad?

Is something like this bad with memcache? 1. GET LIST OF KEYS 2. FOR EACH KEY IN LIST OF KEYS - GET DATA I'm expecting the list of keys to be around ~1000 long. If this is bad, I'm wondering if there is a better way to do this? I figured memcache might be fast enough where such an O(n) query might not be so important. I would ne...