Doozer

一致的分布式数据存储。「A consistent distributed data store.」

Github星跟踪图

Doozer

logo

Build Status

What Is It?

Doozer is a highly-available, completely consistent
store for small amounts of extremely important data.
When the data changes, it can notify connected clients
immediately (no polling), making it ideal for
infrequently-updated data for which clients want
real-time updates. Doozer is good for name service,
database master elections, and configuration data shared
between several machines. See When Should I Use It?,
below, for details.

See the mailing list to discuss doozer with
other users and developers.

Quick Start

  1. Download doozerd

  2. Unpack the archive and put doozerd in your PATH

  3. Repeat for doozer

  4. Start a doozerd with a WebView listening on :8080

     $ doozerd -w ":8080"
    
  5. Set a key and read it back

     $ echo "hello, world", doozer add /message
     $ doozer get /message
     hello, world
    
  6. Open http://localhost:8080 and see your message

doozer web view

How Does It Work?

Doozer is a network service. A handful of machines
(usually three, five, or seven) each run one doozer
server process. These processes communicate with each
other using a standard fully-consistent distributed
consensus algorithm. Clients dial in to one or more of
the doozer servers, issue commands, such as GET, SET,
and WATCH, and receive responses.

(insert network diagram here)

Each doozerd process has a complete copy of the
datastore and serves both read and write requests; there
is no distinguished "master" or "leader". Doozer is
designed to store data that fits entirely in memory; it
never writes data to permanent files. A separate tool
provides durable storage for backup and recovery.

When Should I Use It?

Here are some example scenarios:

  1. Name Service

    You have a set of machines that serve incoming HTTP
    requests. Due to hardware failure, occasionally one
    of these machines will fail and you replace it with a
    new machine at a new network address. A change to DNS
    data would take time to reach all clients, because
    the TTL of the old DNS record would cause it to
    remain in client caches for some time.

    Instead of DNS, you could use Doozer. Clients can
    subscribe to the names they are interested in, and
    they will get notified when any of those names’
    addresses change.

  2. Database Master Election

    You are deploying a MySQL system. You want it to have
    high availability, so you add slaves on separate
    physical machines. When the master fails, you might
    promote one slave to become the new master. At any
    given time, clients need to know which machine is the
    master, and the slaves must coordinate with each
    other during failover.

    You can use doozer to store the address of the
    current master and all information necessary to
    coordinate failover.

  3. Configuration

    You have processes on several different machines, and
    you want them all to use the same config file, which
    you must occasionally update. It is important that
    they all use the same configuration.

    Store the config file in doozer, and have the
    processes read their configuration directly from
    doozer.

What can I do with it?

We have a detailed description of the data model.

For ways to manipulate or read the data, see the protocol spec.

Try out doozer's fault-tolerance with some fire drills.

Similar Projects

Doozer is similar to the following pieces of software:

Hacking on Doozer

License and Authors

Doozer is distributed under the terms of the MIT
License. See LICENSE for details.

Doozer was created by Blake Mizerany and Keith Rarick.
Type git shortlog -s for a full list of contributors.

主要指标

概览
名称与所有者ha/doozerd
主编程语言Go
编程语言Shell (语言数: 4)
平台
许可证MIT License
所有者活动
创建于2011-04-19 03:35:05
推送于2016-03-16 04:01:32
最后一次提交2013-12-28 11:22:24
发布数11
最新版本名称v0.8 (发布于 2011-06-13 19:26:26)
第一版名称works (发布于 )
用户参与
星数3.3k
关注者数175
派生数265
提交数1.6k
已启用问题?
问题数41
打开的问题数22
拉请求数14
打开的拉请求数3
关闭的拉请求数19
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?