Memcache - Which server is loading

Discussion in 'PHP' started by Thorlax402, Aug 3, 2011.

  1. #1
    I have script storing caching information with memcache that has 4 servers added to the pool. All of which are equal in weight. However, one of the servers seems to be used much more frequently than the others. I've been scouring the php docs to try to figure out how it is determined which server is going to be used to store cache data next, but can't find any specifics. Does anyone know how this is done?

    Also, I am aware that this could simply be a coincidence and that randomization could have simply provided seemingly un-random results, but I need to be able to rule out everything else in order to show this to be the case.


    Thanks in advance,
    ~Thorlax
     
    Thorlax402, Aug 3, 2011 IP
  2. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,334
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #2
    Most likely coincidence since it routes to a server based on the key hash.  If you have one popular key that is used a lot, that key always goes to a specific server.
     
    digitalpoint, Aug 3, 2011 IP
  3. Thorlax402

    Thorlax402 Member

    Messages:
    194
    Likes Received:
    2
    Best Answers:
    5
    Trophy Points:
    40
    #3
    I think that's where the digging seems to be leading me. Thanks.
     
    Thorlax402, Aug 5, 2011 IP