radoshttpd

module
v0.0.0-...-5119b6c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 25, 2021 License: Apache-2.0

README

基本操作

参考api.markdown

Build

  • go > go1.7

  • ceph-devel

  • rpmbuild

  • make

all the dep is in Godeps

make rpm

Run

Edit wuzei.json, the default configure is not needed to modify.

Use "wuzei" as default shared password for auth.

The cache feature is disabled by default;

The ddos feature is enabled by default; if you do not use ddosproof, it could be disabled.

Cache

基于 Groupcache 实现。 每个wuzei节点既是Groupcache Server也是Groupcache Client.

Groupcache is a caching and cache-filling library, intended as a replacement for memcached in many cases.

配置文件: /etc/wuzei/wuzei.json

给Groupcache用的选项如下:

  • "Name": "objcache.wuzei"

    所有wuzei节点都应使用同样的名字,以共享Groupcache.

  • "CacheSizeMBytes": 1024

    当前节点用于缓存的内存大小。单位为MiB.

    注意

      受Golang GC的限制,wuzei释放的内存并不会及时还给OS。
      导致wuzei需要的最大内存为该缓存的2倍左右。
      经测试发现,当前最新的Golang 1.4 还是没有解决这个问题。
    
  • "CacheChunkSizeKBytes": 2048

    cache分片的大小。单位为KiB.

  • "CacheMaxObjectSizeKBytes": 4096

    最大可缓存对象的大小。单位为KiB.

    超过这个大小的对象不会被缓存。

  • "MyIPAddr": "127.0.0.1"

    Groupcache Server监听这个地址。通过这个地址共享缓存给其他节点。

  • "Port": 10946

    Groupcache Server监听的端口。

  • "Peers": ["127.0.0.1"]

    所有Groupcache节点的IP地址。

    新增或者删除wuzei节点后,需要改变所有节点的这个配置。

改变配置文件中的MyIPAddr, Port和Peers后,可发SIGHUP给wuzei,重新读取配置文件。

Directories

Path Synopsis
Godeps
_workspace/src/github.com/codegangsta/inject
Package inject provides utilities for mapping and injecting dependencies in various ways.
Package inject provides utilities for mapping and injecting dependencies in various ways.
_workspace/src/github.com/codegangsta/martini
Package martini is a powerful package for quickly writing modular web applications/services in Golang.
Package martini is a powerful package for quickly writing modular web applications/services in Golang.
_workspace/src/github.com/golang/groupcache
Package groupcache provides a data loading mechanism with caching and de-duplication that works across a set of peer processes.
Package groupcache provides a data loading mechanism with caching and de-duplication that works across a set of peer processes.
_workspace/src/github.com/golang/groupcache/consistenthash
Package consistenthash provides an implementation of a ring hash.
Package consistenthash provides an implementation of a ring hash.
_workspace/src/github.com/golang/groupcache/lru
Package lru implements an LRU cache.
Package lru implements an LRU cache.
_workspace/src/github.com/golang/groupcache/singleflight
Package singleflight provides a duplicate function call suppression mechanism.
Package singleflight provides a duplicate function call suppression mechanism.
_workspace/src/github.com/golang/protobuf/proto
Package proto converts data structures to and from the wire format of protocol buffers.
Package proto converts data structures to and from the wire format of protocol buffers.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL