{"id":13344962,"url":"https://github.com/google/seesaw","last_synced_at":"2025-05-12T13:13:11.409Z","repository":{"id":38418296,"uuid":"47389445","full_name":"google/seesaw","owner":"google","description":"Seesaw v2 is a Linux Virtual Server (LVS) based load balancing platform.","archived":false,"fork":false,"pushed_at":"2025-04-23T08:30:29.000Z","size":409,"stargazers_count":5664,"open_issues_count":17,"forks_count":514,"subscribers_count":284,"default_branch":"master","last_synced_at":"2025-05-12T13:13:00.561Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/google.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2015-12-04T07:49:07.000Z","updated_at":"2025-05-12T09:24:27.000Z","dependencies_parsed_at":"2022-08-09T04:00:15.857Z","dependency_job_id":"0f74161f-7460-495a-ac11-96b1d3f91707","html_url":"https://github.com/google/seesaw","commit_stats":{"total_commits":131,"total_committers":21,"mean_commits":6.238095238095238,"dds":0.6717557251908397,"last_synced_commit":"1cdf2d7e3bbb978d7ac3cfb5948eda2428ee0e94"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fseesaw","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fseesaw/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fseesaw/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fseesaw/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/google","download_url":"https://codeload.github.com/google/seesaw/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253745195,"owners_count":21957319,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-29T20:00:48.856Z","updated_at":"2025-05-12T13:13:10.745Z","avatar_url":"https://github.com/google.png","language":"Go","readme":"# Seesaw v2\n\n[![GoDoc](https://godoc.org/github.com/google/seesaw?status.svg)](https://godoc.org/github.com/google/seesaw)\n\nNote: This is not an official Google product.\n\n## About\n\nSeesaw v2 is a Linux Virtual Server (LVS) based load balancing platform.\n\nIt is capable of providing basic load balancing for servers that are on the\nsame network, through to advanced load balancing functionality such as anycast,\nDirect Server Return (DSR), support for multiple VLANs and centralised\nconfiguration.\n\nAbove all, it is designed to be reliable and easy to maintain.\n\n## Requirements\n\nA Seesaw v2 load balancing cluster requires two Seesaw nodes - these can be\nphysical machines or virtual instances. Each node must have two network\ninterfaces - one for the host itself and the other for the cluster VIP. All\nfour interfaces should be connected to the same layer 2 network.\n\n## Building\n\nSeesaw v2 is developed in Go and depends on several Go packages:\n\n- [golang.org/x/crypto/ssh](http://godoc.org/golang.org/x/crypto/ssh)\n- [github.com/dlintw/goconf](http://godoc.org/github.com/dlintw/goconf)\n- [github.com/golang/glog](http://godoc.org/github.com/golang/glog)\n- [github.com/golang/protobuf/proto](http://godoc.org/github.com/golang/protobuf/proto)\n- [github.com/miekg/dns](http://godoc.org/github.com/miekg/dns)\n\nAdditionally, there is a compile and runtime dependency on\n[libnl](https://www.infradead.org/~tgr/libnl/)\n\nOn a Debian/Ubuntu style system, you should be able to prepare for building\nby running:\n\n    apt-get install golang\n    apt-get install libnl-3-dev libnl-genl-3-dev\n\nIf your distro has a go version before 1.18, you may need to fetch a newer\nrelease from https://golang.org/dl/.\n\nIf you are running before go version 1.11 or you want to set `GO111MODULE=off`,\nafter setting `GOPATH` to an appropriate location (for example `~/go`):\n\n    go get -u golang.org/x/crypto/ssh\n    go get -u github.com/dlintw/goconf\n    go get -u github.com/golang/glog\n    go get -u github.com/miekg/dns\n    go get -u github.com/kylelemons/godebug/pretty\n    go get -u github.com/golang/protobuf/proto\n\nEnsure that `${GOPATH}/bin` is in your `${PATH}` and in the seesaw directory:\n\n    make test\n    make install\n\nIf you wish to regenerate the protobuf code, the protobuf compiler is needed:\n\n    apt-get install protobuf-compiler\n\nThe protobuf code can then be regenerated with:\n\n    make proto\n\n## Installing\n\nAfter `make install` has run successfully, there should be a number of\nbinaries in `${GOPATH}/bin` with a `seesaw_` prefix. Install these to the\nappropriate locations:\n\n    SEESAW_BIN=\"/usr/local/seesaw\"\n    SEESAW_ETC=\"/etc/seesaw\"\n    SEESAW_LOG=\"/var/log/seesaw\"\n\n    INIT=`ps -p 1 -o comm=`\n\n    install -d \"${SEESAW_BIN}\" \"${SEESAW_ETC}\" \"${SEESAW_LOG}\"\n\n    install \"${GOPATH}/bin/seesaw_cli\" /usr/bin/seesaw\n\n    for component in {ecu,engine,ha,healthcheck,ncc,watchdog}; do\n      install \"${GOPATH}/bin/seesaw_${component}\" \"${SEESAW_BIN}\"\n    done\n\n    if [ $INIT = \"init\" ]; then\n      install \"etc/init/seesaw_watchdog.conf\" \"/etc/init\"\n    elif [ $INIT = \"systemd\" ]; then\n      install \"etc/systemd/system/seesaw_watchdog.service\" \"/etc/systemd/system\"\n      systemctl --system daemon-reload\n    fi\n    install \"etc/seesaw/watchdog.cfg\" \"${SEESAW_ETC}\"\n\n    # Enable CAP_NET_RAW for seesaw binaries that require raw sockets.\n    /sbin/setcap cap_net_raw+ep \"${SEESAW_BIN}/seesaw_ha\"\n    /sbin/setcap cap_net_raw+ep \"${SEESAW_BIN}/seesaw_healthcheck\"\n\nThe `setcap` binary can be found in the libcap2-bin package on Debian/Ubuntu.\n\n## Configuring\n\nEach node needs a `/etc/seesaw/seesaw.cfg` configuration file, which provides\ninformation about the node and who its peer is. Additionally, each load\nbalancing cluster needs a cluster configuration, which is in the form of a\ntext-based protobuf - this is stored in `/etc/seesaw/cluster.pb`.\n\nAn example seesaw.cfg file can be found in\n[etc/seesaw/seesaw.cfg.example](etc/seesaw/seesaw.cfg.example) - a minimal\nseesaw.cfg provides the following:\n\n- `anycast_enabled` - True if anycast should be enabled for this cluster.\n- `name` - The short name of this cluster.\n- `node_ipv4` - The IPv4 address of this Seesaw node.\n- `peer_ipv4` - The IPv4 address of our peer Seesaw node.\n- `vip_ipv4` - The IPv4 address for this cluster VIP.\n\nThe VIP floats between the Seesaw nodes and is only active on the current\nmaster. This address needs to be allocated within the same netblock as both\nthe node IP address and peer IP address.\n\nAn example cluster.pb file can be found in\n[etc/seesaw/cluster.pb.example](etc/seesaw/cluster.pb.example) - a minimal\n`cluster.pb` contains a `seesaw_vip` entry and two `node` entries. For each\nservice that you want to load balance, a separate `vserver` entry is\nneeded, with one or more `vserver_entry` sections (one per port/proto pair),\none or more `backends` and one or more `healthchecks`. Further information\nis available in the protobuf definition - see\n[pb/config/config.proto](pb/config/config.proto).\n\nOn an upstart based system, running `restart seesaw_watchdog` will start (or\nrestart) the watchdog process, which will in turn start the other components.\n\n### Anycast\n\nSeesaw v2 provides full support for anycast VIPs - that is, it will advertise\nan anycast VIP when it becomes available and will withdraw the anycast VIP if\nit becomes unavailable. For this to work the Quagga BGP daemon needs to be\ninstalled and configured, with the BGP peers accepting host-specific routes\nthat are advertised from the Seesaw nodes within the anycast range (currently\nhardcoded as `192.168.255.0/24`).\n\n## Command Line\n\nOnce initial configuration has been performed and the Seesaw components are\nrunning, the state of the Seesaw can be viewed and controlled via the Seesaw\ncommand line interface. Running `seesaw` (assuming `/usr/bin` is in your path)\nwill give you an interactive prompt - type `?` for a list of top level\ncommands. A quick summary:\n\n- `config reload` - reload the cluster.pb from the current config source.\n- `failover` - failover between the Seesaw nodes.\n- `show vservers` - list all vservers configured on this cluster.\n- `show vserver \u003cname\u003e` - show the current state for the named vserver.\n\n## Troubleshooting\n\nA Seesaw should have five components that are running under the watchdog - the\nprocess table should show processes for:\n\n- `seesaw_ecu`\n- `seesaw_engine`\n- `seesaw_ha`\n- `seesaw_healthcheck`\n- `seesaw_ncc`\n- `seesaw_watchdog`\n\nAll Seesaw v2 components have their own logs, in addition to the logging\nprovided by the watchdog. If any of the processes are not running, check the\ncorresponding logs in `/var/log/seesaw` (e.g. `seesaw_engine.{log,INFO}`).\n","funding_links":[],"categories":["Go","others","On prem","NetWork"],"sub_categories":["Observability"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoogle%2Fseesaw","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoogle%2Fseesaw","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoogle%2Fseesaw/lists"}