Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7959647
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T04:36:25+00:00 2026-06-04T04:36:25+00:00

In Django, to cluster memcached nodes, a very simple method is used. Simply list

  • 0

In Django, to cluster memcached nodes, a very simple method is used. Simply list all node address in the settings.py file of all your django servers like so:

CACHES = {
    'default': {
        'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
        'LOCATION': [
            'xxx.xxx.xxx.240:11211',
            'xxx.xxx.xxx.242:11211',
            ...,
        ]
    }
}

Obviously editing the setting.py file of each instance whenever an instance drops out or a new one is added would be painful, how would you go about automagically managing the addition of new nodes to the cluster?

  • All instances are behind a load balancer.

Possible non-answers:

  • I could also just dedicate one django instance to run a memcached
    single node since I am only using memcached to store tiny tokens.
    But the goal is to have all ec2 instances be identical.
  • I could also use elasticache but it is expensive (35 bucks/month! 🙂
    ) for the smallest version

Note:
I use memcached to prevent celeryd workers from accessing the same resources, but its ok if occasionally a resource is double accessed. And my tokens have a short lifespan (less than 15 seconds). So loosing memcached nodes is not a big deal as long as it doesn’t happen too frequently.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T04:36:25+00:00Added an answer on June 4, 2026 at 4:36 am

    If your cache data really is very small, maybe you’d be interested in a non-amazon hosted cache service like redistogo.com. They have a free version if your data is small enough and the pricing scales very very reasonably.

    This doesn’t answer your question at all, but since you mentioned elasticache but balked at the price, maybe it will fit your needs.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Django settings includes a list of python variables that are used for a plethora
Django tutorials everywhere use constant-set application name all around - in urls file, in
Django uses real Python files for settings, Trac uses a .ini file, and some
Django creates a search box on the list display page when the field search_fields
Django is making very nice forms after creating a models.py and an admin.py. How
django.forms is very nice, and does almost exactly what I want to do on
Django code samples involving post data often shows code similar to this: if request.method
Django is sending the pre/post_delete signals if you are using the queryset.delete() method, but
Django comes with a list of built-in middleware , but if one wants to
[Django 1.0.2] I have a view set up like this: (r'^redirect/(?P<object_id>\d+)/(?P<url>.*)/$', 'django.views.generic.simple.redirect_to', {'content_type': SiteType},

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.