swift术语解释

Note:本文按照最新发布的1.44 dev文档翻译,并保持更新和修正翻译错误。

术语约定

ring 环

account 帐号

container 容器

object 对象

zone 区域

devcie 设备

partition 分区

replica 副本

replication 复制

Weight 权重

Cluster 集群

consistency window 一致性窗口

Proxy Server  代理服务器

The Proxy Server is responsible for tying together the rest of the Swift architecture. For each request, it will look up the location of the account, container, or object in the ring (see below) and route the request accordingly. The public API is also exposed through the Proxy Server.

代理服务器用于将Swift结构的其他部分连结起来。对于每个请求,它将会查询在环中查询帐号、容器或者对象的位置并且相应地按照某路线来发送请求。也可以用公用API来向代理服务器发送请求。

A large number of failures are also handled in the Proxy Server. For example, if a server is unavailable for an object PUT, it will ask the ring for a handoff server and route there instead.

代理服务器也处理大量的失败。例如,如果对于一个对象PUT请求时的某个服务器不可能,它将会询问ring来转发请求到目标服务器。

When objects are streamed to or from an object server, they are streamed directly through the proxy server to or from the user – the proxy server does not spool them.

当对象以流的形式到(来自)一个对象服务器,它们直接从代理服务器流动到(来自)用户—代理服务器并不缓冲它们。

The Ring   环

A ring represents a mapping between the names of entities stored on disk and their physical location. There are separate rings for accounts, containers, and objects. When other components need to perform any operation on an object, container, or account, they need to interact with the appropriate ring to determine its location in the cluster.

环表示存储在硬盘上的实体名称和物理位置的映射。帐号、容器、对象都有独立的环。当swift的其它组件(比如replication)需要对帐号、容器或对象操作时,需要使用相应的环数据来确定在集群上的位置。

The Ring maintains this mapping using zones, devices, partitions, and replicas. Each partition in the ring is replicated, by default, 3 times across the cluster, and the locations for a partition are stored in the mapping maintained by the ring. The ring is also responsible for determining which devices are used for handoff in failure scenarios.

环使用区域,设备、分区和副本来维护这些映射信息。环中每个分区在集群中都(默认)有3个副本。每个分区的位置由环来维护,并存储在映射中。当代理服务器转发的客户端请求失败时(多数情况下,失败源自存储或转移数据时目标服务器无响应),环也负责决定哪一个设备将接手请求。

Data can be isolated with the concept of zones in the ring. Each replica of a partition is guaranteed to reside in a different zone. A zone could represent a drive, a server, a cabinet, a switch, or even a datacenter.

环使用区域的概念来保证数据相互隔离。每个分区的副本被放在不同的区域上。一个区域可以是一个硬盘,一个服务器,一个机架,一个交换机,甚至是一个数据中心。

The partitions of the ring are equally divided among all the devices in the Swift installation. When partitions need to be moved around (for example if a device is added to the cluster), the ring ensures that a minimum number of partitions are moved at a time, and only one replica of a partition is moved at a time.

swift安装时,环中的分区会均衡地划分到所有的设备中。当分区需要移动时(例如新设备被加入到集群),环会确保一次移动最少数量的分区数,并且一次只移动一个分区的一个副本。

Weights can be used to balance the distribution of partitions on drives across the cluster. This can be useful, for example, when different sized drives are used in a cluster.

权重可以用来平衡集群中分区在驱动器上的分布。例如,当不同大小的驱动器被用于集群中时就显得非常有用。

The ring is used by the Proxy server and several background processes (like replication).

环被代理服务器和一些后台程序使用(如复制)。

Object Server  对象服务器

The Object Server is a very simple blob storage server that can store, retrieve and delete objects stored on local devices. Objects are stored as binary files on the filesystem with metadata stored in the file’s extended attributes (xattrs). This requires that the underlying filesystem choice for object servers support xattrs on files. Some filesystems, like ext3, have xattrs turned off by default.

对象服务器是个简单的大对象(blob)存储服务器,可以用来存储、检索和删除本地设备上的对象。在文件系统上,对象以二进制文件的形式存储,它的元数据存储在文件系统的扩展属性(xattrs)中。这要求用于对象服务器的文件系统需要支持文件有扩展属性。一些文件系统,像ext3,xattrs属性默认是关闭着的。

Each object is stored using a path derived from the object name’s hash and the operation’s timestamp. Last write always wins, and ensures that the latest object version will be served. A deletion is also treated as a version of the file (a 0 byte file ending with “.ts”, which stands for tombstone). This ensures that deleted files are replicated correctly and older versions don’t magically reappear due to failure scenarios.

每个对象使用对象名称的哈希值和操作的时间戳组成的路径来存储。最后一次写总能成功,并且确保最新一次的对象版本将会被服务。删除也被对待为文件的一个版本(一个以".ts"结尾的0字节文件,ts表示墓碑)。这确保了被删除的文件被正确地复制并且更旧的版本不会由于故障场景下神奇地再现。

Container Server 容器服务器

The Container Server’s primary job is to handle listings of objects. It doesn’t know where those object’s are, just what objects are in a specific container. The listings are stored as sqlite database files, and replicated across the cluster similar to how objects are. Statistics are also tracked that include the total number of objects, and total storage usage for that container.

容器服务器首要的工作是处理对象的列表。容器服务器并不知道对象存在哪,只知道指定容器里存的哪些对象。 这些对象信息以sqlite数据库文件的形式存储,和对象一样在集群上做类似的备份。容器服务器也跟做一些跟踪统计,比如对象的总数,容器的使用情况。

Account Server  帐号服务器

The Account Server is very similar to the Container Server, excepting that it is responsible for listings of containers rather than objects.

帐号服务器与容器服务器非常相似,除了它是负责处理容器的列表而不是对象。

Replication  复制

Replication is designed to keep the system in a consistent state in the face of temporary error conditions like network outages or drive failures.

复制被设计在面临如网络终端或者驱动器故障等临时性错误情况时来保持系统在一致性的状态。

The replication processes compare local data with each remote copy to ensure they all contain the latest version. Object replication uses a hash list to quickly compare subsections of each partition, and container and account replication use a combination of hashes and shared high water marks.

复制进程将本地数据与每个远程拷贝比较以确保它们都包含有最新的版本。对象复制使用一个哈希列表来快速地比较每个分区的小部分,并且容器和帐号复制使用哈希值的组合和共享的高水印。

Replication updates are push based. For object replication, updating is just a matter of rsyncing files to the peer. Account and container replication push missing records over HTTP or rsync whole database files.

复制更新基于推送的(这话咋翻译?)。对于对象复制,更新只是同步rsync文件到对等节点。帐号和容器的复制通过HTTP或rsync来推送整个数据库文件丢失的记录。

The replicator also ensures that data is removed from the system. When an item (object, container, or account) is deleted, a tombstone is set as the latest version of the item. The replicator will see the tombstone and ensure that the item is removed from the entire system.

复制器也确保数据已从系统中移除。当一个条目(对象、容器、或者帐号)被删除,一个墓碑文件被设置作为该条目的最新版本。复制器将会观察到该墓碑文件并确保该条目从整个系统中移除。

Updaters   更新器

There are times when container or account data can not be immediately updated. This usually occurs during failure scenarios or periods of high load. If an update fails, the update is queued locally on the filesystem, and the updater will process the failed updates. This is where an eventual consistency window will most likely come in to play. For example, suppose a container server is under load and a new object is put in to the system. The object will be immediately available for reads as soon as the proxy server responds to the client with success. However, the container server did not update the object listing, and so the update would be queued for a later update. Container listings, therefore, may not immediately contain the object.

在一些情况下,容器或帐号中的数据不会被立即更新。这种情况经常发生在系统故障或者是高负荷的情况下。如果更新失败,该次更新在本地文件系统上会被加入队列,然后更新器会继续处理这些失败了的更新工作。最终,一致性窗口将会起作用。例如,假设一个容器服务器被加载之后,一个新的对象被加入到系统。当代理服务器成功地响应客户端的请求,这个对象将变为直接可用的。但是容器服务器并没有更新对象列表,因此此次更新将进入队列以等待延后的更新。所以,容器列表不可能马上就包含这个新对象。

In practice, the consistency window is only as large as the frequency at which the updater runs and may not even be noticed as the proxy server will route listing requests to the first container server which responds. The server under load may not be the one that serves subsequent listing requests – one of the other two replicas may handle the listing.

实际使用中,一致性窗口的大小和更新器的运行频度一致,并且甚至可能不会被注意到因为代理服务器会转送列表请求给第一个响应的容器服务器。正在被加载的服务器不应该响应后续的列表请求,其他2个副本中的一个应该处理这些列表请求。

Auditors  审计器

Auditors crawl the local server checking the integrity of the objects, containers, and accounts. If corruption is found (in the case of bit rot, for example), the file is quarantined, and replication will replace the bad file from another replica. If other errors are found they are logged (for example, an object’s listing can’t be found on any container server it should be).

审计器会在本地服务器上反复地爬取来检测对象、容器、帐号的完整性。一旦发现不完整的数据(例如,发生了bit rot的情况:内有分散中的细小的位元变化,可能改变代码),该文件就会被隔离,然后复制器会从其他的副本那里把问题文件替换。如果其他错误出现(比如在任何一个容器服务器中都找不到所需的对象),还会记录进日志。


转自http://www.cnblogs.com/yuxc/archive/2011/10/06/2199691.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值