端口:
Port | Purpose | Membase Server | Membase Client | Administration Client |
---|---|---|---|---|
8091 | Web Administration Port | Yes | No | Yes |
11211 | Data Port (proxy port too) | Yes | Yes | Yes |
11210 | Internal Cluster Port (service port) | Yes | Yes | No |
4369 | Erlang Port Mapper (epmd) | Yes | No | No |
21100 to 21199 (inclusive) | Node data exchange | Yes | No | No |
Membase can listen for data operations on two configurable ports: 11210 and 11211 (these are default port numbers in membase). Both ports are "memcapable," supporting the memcached ASCII and Binary protocols.
Port 11211 is the port on which an embedded proxy listens (the standard memcached port). It can receive, and successfully process, data operations for keys that are owned by vBuckets not hosted by this server. The proxy will forward the request to the right server then return the result to the client.
二进制接口
Port 11210 is the port on which the membase data operation server listens. It will reject data operations for keys owned by vBuckets not hosted by this server. To do this, a key-vBucket hash must be performed on all requests. The vBucket is then compared with the list of vBuckets hosted by this server.
虚拟内存查询
Fetch Workflow
代理:
memcache中很多使用了一致性hash来算key分布,这样对线性扩展不方便。为了支持,memcache
内置代理
独立代理(proxy on localhost)
vbucket client
FairOver
1. 雪崩效应(惊群)
vbuckets 可以解决
2. 网络分区(无法互通,导致双方都服务所有的keys)
互通后,以一个为准,另外一方认为是新增节点,逐步同步
We are considering integrating automatic failover options along with rules (e.g. maximum number of nodes to auto failover) into Membase, so please let us know your thoughts and use cases! (Simply add a comment on this page below)
VBuckets
Bucket Types
The default bucket is a Membase bucket that always resides on port 11211 and is a non-SASL authenticating bucket. When Membase is first install this bucket is automatically set up during installation. This bucket may be removed after installation and may also be re-added later, but when re-adding a bucket named "default", the bucket must be place on port 11211 and must be a non-SASL authenticating bucket. A bucket not named default may not reside on port 11211 if it is a non-SASL bucket. The default bucket may be reached with a vBucket aware smart client, an ASCII client or a binary client that doesn't use SASL authentication.
Non-SASL buckets may be placed on any available port with the exception of port 11211 if the bucket is not named "default". Only one Non-SASL bucket may placed on any individual port. These buckets may be reached with a vBucket aware smart client, an ASCII client or a binary client that doesn't use SASL authentication
SASL authenticating Membase buckets may only be placed on port 11211 and each bucket is differentiated by its name and password. SASL bucket may not be placed on any other port beside 11211. These buckets can be reached with either a vBucket aware smart client or a binary client that has SASL support. These buckets cannot be reached with ASCII clients.