Memcache架构

Memcache架构_第1张图片


A basic memcached lookup can be illustrated in the example below with Clients X, Y, Z and
Servers A, B, C. 

‘Set’ the Key and Value 

• Client X wants to set the key “foo” with value “seattle”
• Client X takes the list of available memcached servers (A,B,C) and hashes the key against them
• Server B is selected
• Client X directly connects to Server B, and sets key “foo” with the value “seattle”

‘Get’ the Key and Value

• Client Z wants to get key “foo”
• Client Z is able to use the same hashing process to determine that key “foo” is on Server B
• Client Z directly requests key “foo” from Server B and gets back “seattle”
• Subsequent requests from Clients X, Y or Z for key “foo” will access the data directly from Server B 

你可能感兴趣的:(Database)