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 8104139
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T23:45:03+00:00 2026-06-05T23:45:03+00:00

Question:- Does java client need to worry about multiple servers ? Meaning:- I have

  • 0

Question:-
Does java client need to worry about multiple servers ?

Meaning:-
I have given two servers in memcached client, but when i set or get a key from cache, do i need to provide any server related info to it or memcache itself takes care of it??

My knowledge:-
Memcache itself takes care due to consistent hashing.

but does spymemcached 2.8.0 provides consistent hashing???

  • 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-05T23:45:05+00:00Added an answer on June 5, 2026 at 11:45 pm

    Memcached servers are pooling servers. Meaning that you define a pool (a list) of servers and when the Java client attempts a write it writes towards the pool.

    It’s the client’s job to decide which server from the pool will receive and store the value and how it will retrieve the value from that pool.

    Basically this allows you to start with one Memcached server (possibly on the same machine) and if push comes to shove you can add a few dozen more servers to the pool without touching the application code.

    Since the client is responsible of distributing data across the pool of servers (the client has to choose right memcached server to store/fetch data) there are few distribution algorithms.

    One of the simplest is modula. This algorithm distributes keys depending on the amount of memcached servers in pool. If the number of servers in the pool changes, the client won’t be able to the find stored data, there will be cache misses. In such case it’s better to use consistent hashing.

    Most popular java memcached clients spymemached and xmemcached support consistent hashing.

    In some use cases instead of directly using the memcached client, caching can be added to a spring application through AOP (interceptors) using simple-spring-memcached or Spring 3.1 Cache Abstraction. Spring Cache currently doesn’t support memcached but simple-spring-memcached provides such integration in snapshot build and upcoming 3.0.0 release.

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

Sidebar

Related Questions

Naive question about Java syntax. What does <T> T accept(ObjectVisitorEx<T> visitor); mean? What would
Java 6 API question. Does calling LockSupport.unpark(thread) have a happens-before relationship to the return
Simple question: does the Java memory/synchronization model guarantee atomic pointer writes? That is, if
Question: Does anyone have an example of a filter as you type dropdown control
Question: Does anyone have a quick way for removing all the extra resources in
The question does not refer to some Vim-mode in Emacs, but to Vim inside
Drupal Question: Does anyone have a method of using Views and highlighting a selected/current
I have this code to create a configuration of a java client to connect
I apologize in advance for this somewhat ignorant question, but I have researched this
Note: A have asked this question at the Superuser community first , but since

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.