首页 > 业内资讯 > Seesaw:Google 开源的负载均衡系统

Seesaw:Google 开源的负载均衡系统

时间:2016-02-02 | 来源:developerWorks | 阅读:151

话题: developerWorks


After setting GOPATH to an appropriate location (for example ~/go):

go get -u golang.org/x/crypto/ssh go get -u github.com/dlintw/goconf go get -u github.com/golang/glog go get -u github.com/golang/protobuf/{proto,protoc-gen-go} go get -u github.com/miekg/dns


Ensure that ${GOPATH}/bin is in your ${PATH} and in the seesaw directory:

make test make install


Installing

After make install has run successfully, there should be a number of binaries in ${GOPATH}/bin with a seesaw_ prefix. Install these to the appropriate locations:

SEESAW_BIN="/usr/local/seesaw" SEESAW_ETC="/etc/seesaw" SEESAW_LOG="/var/log/seesaw" install -d "${SEESAW_BIN}" "${SEESAW_ETC}" "${SEESAW_LOG}" install "${GOPATH}/bin/seesaw_cli" /usr/bin/seesaw for component in {ecu,engine,ha,healthcheck,ncc,watchdog}; do install "${GOPATH}/bin/seesaw_${component}" "${SEESAW_BIN}" done install "etc/init/seesaw_watchdog.conf" "/etc/init" install "etc/seesaw/watchdog.cfg" "${SEESAW_ETC}" # Enable CAP_NET_RAW for seesaw binaries that require raw sockets. /sbin/setcap cap_net_raw ep "${SEESAW_BIN}/seesaw_ha" /sbin/setcap cap_net_raw ep "${SEESAW_BIN}/seesaw_healthcheck"


The setcap binary can be found in the libcap2-bin package on Debian/Ubuntu.


Configuring

Each node needs a /etc/seesaw/seesaw.cfg configuration file, which provides information about the node and who its peer is. Additionally, each load balancing cluster needs a cluster configuration, which is in the form of a text-based protobuf - this is stored in /etc/seesaw/cluster.pb.

推荐

最新好玩手游

更多

手游风云榜

更多

资讯阅读

更多


湘ICP备2022002427号-10 湘公网安备:43070202000427号
© 2013~2024 haote.com 好特网