{"id":20064891,"url":"https://github.com/baidu/ins","last_synced_at":"2025-04-09T16:16:13.877Z","repository":{"id":31540409,"uuid":"35104997","full_name":"baidu/ins","owner":"baidu","description":"iNexus, coordinate large scale services","archived":false,"fork":false,"pushed_at":"2020-10-26T06:43:31.000Z","size":3711,"stargazers_count":213,"open_issues_count":10,"forks_count":86,"subscribers_count":36,"default_branch":"master","last_synced_at":"2025-04-09T16:16:03.555Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/baidu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-05-05T14:33:02.000Z","updated_at":"2025-02-23T12:11:07.000Z","dependencies_parsed_at":"2022-09-04T16:00:52.511Z","dependency_job_id":null,"html_url":"https://github.com/baidu/ins","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baidu%2Fins","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baidu%2Fins/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baidu%2Fins/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baidu%2Fins/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/baidu","download_url":"https://codeload.github.com/baidu/ins/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248065283,"owners_count":21041872,"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-11-13T13:48:08.425Z","updated_at":"2025-04-09T16:16:13.828Z","avatar_url":"https://github.com/baidu.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nexus - Raft Protocol Based Cluster Coordinator\n\n[![Build Status](https://travis-ci.org/baidu/ins.svg?branch=master)](https://travis-ci.org/baidu/ins)\n[![Coverity Scan Build Status](https://scan.coverity.com/projects/10966/badge.svg)](https://scan.coverity.com/projects/10966)\n[![Documentation Status](https://img.shields.io/badge/中文文档-最新-brightgreen.svg)](doc/introduction_cn.md)\n\n**nexus**, used to be known as *i name service(ins)*, is a high available key-value store to hold crucial meta data, which also support mechanism to coordinate large scale services.\n\nnexus is based on [Raft protocol](https://raft.github.io/) to keep consistency between multi-nodes, and provide key-value data access, distributed lock mechanism(lock) and event callback function(watch).\n\n## Who Is Using Nexus\n\nnexus was born to provide a *Google Chubby* style service in [Galaxy](https://github.com/baidu/galaxy), a cluster manager system. Now it supports several online services in Baidu, Inc., including [Galaxy](https://github.com/baidu/galaxy) and [Tera](https://github.com/baidu/tera).\n\nFor those who want to save their important data, who want to keep uniqueness in a cluster, or who want to manage large scale services, please refer to [this](doc/usage.md) for some classical usage.\n\n## Installation and Usage\n\nUse `build.sh` to solve dependency problem, or export proper environment variable to tell Makefile to find proper headers and libraries. All necessary dependencies are listed at the beginning of Makefile. Proved on g++ and clang++.\n\nThe `sandbox` directory holds a few scripts for starting a test cluster on localhost and old-fashioned client tools.\n* Use `start_all.sh` to start a 5-nodes cluster on current server, and generate flagfile for other scripts\n* Use `stop_all.sh` to stop all nodes, and `clean_all.sh` to stop cluster and clean up all data and log\n* Use `stop_one.sh` and `start_one.sh` to temporarily disable and enable a node to check the cluster status\n* Use `show_cluster.sh` to show the status of cluster\n* Use `ins_shell.sh` for old-fasioned nexus client, which uses script to wrap a binary client\n* Use `run_sample.sh` to start a 100k write times test and a 100k read times test\n\nCluster and client use GFlags to parse command line to alter inner parameters. For more information, please refer to [this document](doc/configuration.md).\n\nIn addition to script version of client, we introduced a new C++ version [client](src/client/ncli.cc), providing more convenient functions for testing and online operations. This client also gives an example on how to work with nexus SDK.\n\nWhen deploying to online servers, please use `control.sh` for a single node to start/stop/restart or check the status of health.\n\n## Integration and API\n\n* For C++ user, use `make install_sdk` to export sdk to `PREFIX` dir. Please refer to [this document](doc/cxx_api.md) for more information\n* For Python user, use `make python` to produce library. Please refer to [this document](doc/python_api.md) for more information\n\n## Dependencies\n\nTo build the whole project, following dependencies must be meet:\n* [snappy](https://github.com/google/snappy) 1.1.1 and above\n* [boost](http://www.boost.org/) 1.57.0 and above\n* [GFlags](https://github.com/gflags/gflags) 2.1.2 and above\n* [Google Protocal Buffers](https://github.com/google/protobuf) 2.6.1\n* [sofa-pbrpc](https://github.com/baidu/sofa-pbrpc) 1.1.3 and above\n\nFor unittest, following dependency must be meet:\n* [Google Test](https://github.com/google/googletest) 1.7.0 and above\n\nRaft defined log compaction function needs a slight change in LevelDB, the modified code is located in `thirdparty/leveldb`.\n\n## Contributing\n\nWe welcome any kind of contributions. If there are any developing questions or complaints, please feel free to contact us: [opensearch](mailto:opensearch@baidu.com).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaidu%2Fins","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbaidu%2Fins","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaidu%2Fins/lists"}