{"id":13424950,"url":"https://github.com/ledisdb/ledisdb","last_synced_at":"2025-05-14T02:08:58.298Z","repository":{"id":16542687,"uuid":"19296225","full_name":"ledisdb/ledisdb","owner":"ledisdb","description":"A high performance NoSQL Database Server powered by Go","archived":false,"fork":false,"pushed_at":"2023-10-22T02:24:37.000Z","size":4234,"stargazers_count":4112,"open_issues_count":0,"forks_count":435,"subscribers_count":182,"default_branch":"master","last_synced_at":"2025-05-05T15:09:32.405Z","etag":null,"topics":["golang","goleveldb","ledisdb","redis","rocksdb-support","support-cluster"],"latest_commit_sha":null,"homepage":"https://ledisdb.io","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"sggottlieb/holiday","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ledisdb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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}},"created_at":"2014-04-30T00:43:09.000Z","updated_at":"2025-04-29T02:06:11.000Z","dependencies_parsed_at":"2022-07-07T22:38:38.397Z","dependency_job_id":"bf3612a7-defd-4ffa-a470-d49b5f6becc9","html_url":"https://github.com/ledisdb/ledisdb","commit_stats":{"total_commits":819,"total_committers":31,"mean_commits":"26.419354838709676","dds":0.315018315018315,"last_synced_commit":"d35789ec47e667726160e227e7c05e09627a6d6c"},"previous_names":["siddontang/ledisdb"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ledisdb%2Fledisdb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ledisdb%2Fledisdb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ledisdb%2Fledisdb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ledisdb%2Fledisdb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ledisdb","download_url":"https://codeload.github.com/ledisdb/ledisdb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254053223,"owners_count":22006717,"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":["golang","goleveldb","ledisdb","redis","rocksdb-support","support-cluster"],"created_at":"2024-07-31T00:01:01.138Z","updated_at":"2025-05-14T02:08:53.281Z","avatar_url":"https://github.com/ledisdb.png","language":"Go","funding_links":["https://paypal.me/siddontang"],"categories":["Go","Misc","redis","Generators","Uncategorized"],"sub_categories":["Databases Implemented in Go"],"readme":"# LedisDB \n\n[![Build Status](https://travis-ci.org/ledisdb/ledisdb.svg?branch=develop)](https://travis-ci.org/ledisdb/ledisdb) [![codecov](https://codecov.io/gh/ledisdb/ledisdb/branch/master/graph/badge.svg)](https://codecov.io/gh/ledisdb/ledisdb) [![goreportcard](https://goreportcard.com/badge/github.com/ledisdb/ledisdb)](https://goreportcard.com/report/github.com/ledisdb/ledisdb)\n\nLedisdb is a high-performance NoSQL database library and server written in [Go](http://golang.org). It's similar to Redis but store data in disk. It supports many data structures including kv, list, hash, zset, set.\n\nLedisDB now supports multiple different databases as backends.\n\n## Features\n\n+ Rich data structure: KV, List, Hash, ZSet, Set.\n+ Data storage is not limited by RAM.\n+ Various backends supported: LevelDB, goleveldb, RocksDB, RAM.\n+ Supports Lua scripting.\n+ Supports expiration and TTL.\n+ Can be managed via redis-cli.\n+ Easy to embed in your own Go application. \n+ HTTP API support, JSON/BSON/msgpack output.\n+ Replication to guarantee data safety.\n+ Supplies tools to load, dump, and repair database. \n+ Supports cluster, use [xcodis](https://github.com/ledisdb/xcodis).\n+ Authentication (though, not via http).\n+ Repair integrated: You can use `ledis repair` to repair broken databases and `ledis repair-ttl` to repair a very serious bug for key expiration and TTL if you upgraded from v0.4.\n\n## Build from source\n\nCreate a workspace and checkout ledisdb source\n\n```shell\ngit clone git@github.com:ledisdb/ledisdb.git\ncd ledisdb\n\n#set build and run environment \nsource dev.sh\n\nmake\nmake test\n```\n\nThen you will find all the binary build on `./bin` directory.\n\n## LevelDB support\n\n+ Install leveldb and snappy.\n\n    LedisDB supplies a simple script to install leveldb and snappy: \n\n        sudo sh tools/build_leveldb.sh\n\n    It will install leveldb at /usr/local/leveldb and snappy at /usr/local/snappy by default.\n\n    LedisDB uses the modified LevelDB for better performance. [Details.](https://github.com/ledisdb/ledisdb/wiki/leveldb-source-modification)\n\n    You can easily use other LevelDB versions (like Hyper LevelDB or Basho LevelDB) instead, as long as the header files are in `include/leveldb`, not `include/hyperleveldb` or any other location.\n\n+ Set `LEVELDB_DIR` and `SNAPPY_DIR` to the actual install path in dev.sh.\n+ `make clean \u0026\u0026 make` \n\n## RocksDB support \n\n+ [Install rocksdb(5.1+)](https://github.com/facebook/rocksdb/blob/master/INSTALL.md)(`make shared_lib`) and snappy first.\n\n    LedisDB has not yet supplied a simple script to install.\n\n+ Set `ROCKSDB_DIR` and `SNAPPY_DIR` to the actual install path in `dev.sh`.\n+ `make clean \u0026\u0026 make` \n\n\nIf the RocksDB API changes, LedisDB may not build successfully. LedisDB currently supports RocksDB version 5.1 or later.\n\n## Choose store database\n\nLedisDB now supports goleveldb, leveldb, rocksdb, and RAM. It will use goleveldb by default. \n\nChoosing a store database to use is very simple.\n\n+ Set in server config file\n\n    db_name = \"leveldb\"\n\n+ Set in command flag\n\n    ledis -config=/etc/ledis.conf -db_name=leveldb\n\nFlag command set will overwrite config setting.\n\n## Lua support\n\nLua is supported using [gopher-lua](https://github.com/yuin/gopher-lua), a Lua VM, completely written in Go.\n\n## Configuration\n\nLedisDB uses [toml](https://github.com/toml-lang/toml) as the configuration format. The basic configuration ```./etc/ledis.conf``` in LedisDB source may help you.\n\nIf you don't use a configuration, LedisDB will use the default for you.\n\n## Server Example\n\n```shell\n//set run environment if not\nsource dev.sh\n\n./bin/ledis -config=/etc/ledis.conf\n\n//another shell\n./bin/ledis cli -p 6380\n\nledis 127.0.0.1:6380\u003e set a 1\nOK\nledis 127.0.0.1:6380\u003e get a\n\"1\"\n\n//use curl\ncurl http://127.0.0.1:11181/SET/hello/world\n→ {\"SET\":[true,\"OK\"]}\n\ncurl http://127.0.0.1:11181/0/GET/hello?type=json\n→ {\"GET\":\"world\"}\n```\n\n\n## Package Example\n\n```go\nimport (\n    lediscfg \"github.com/ledisdb/ledisdb/config\"\n    \"github.com/ledisdb/ledisdb/ledis\"\n)\n\n# Use Ledis's default config\ncfg := lediscfg.NewConfigDefault()\nl, _ := ledis.Open(cfg)\ndb, _ := l.Select(0)\n\ndb.Set(key, value)\n\ndb.Get(key)\n```\n\n## Replication Example\n\nSet slaveof in config or dynamiclly\n\n```shell\nledis cli -p 6381 \n\nledis 127.0.0.1:6381\u003e slaveof 127.0.0.1 6380\nOK\n```\n\n## Cluster support\n\nLedisDB uses a proxy named [xcodis](https://github.com/ledisdb/xcodis) to support cluster.\n\n## CONTRIBUTING\n\nSee [CONTRIBUTING.md] .\n\n## Benchmark\n\nSee [benchmark](https://github.com/ledisdb/ledisdb/wiki/Benchmark) for more.\n\n## Todo\n\nSee [Issues todo](https://github.com/ledisdb/ledisdb/issues?labels=todo\u0026page=1\u0026state=open)\n\n## Client\n\nSee [Clients](https://github.com/ledisdb/ledisdb/wiki/Clients) to find or contribute LedisDB client.\n\n## Links\n\n+ [Official Website](https://ledisdb.io)\n+ [GoDoc](https://godoc.org/github.com/ledisdb/ledisdb)\n+ [Server Commands](https://github.com/ledisdb/ledisdb/wiki/Commands)\n\n## Caveat\n\n+ Changing the backend database at runtime is very dangerous. Data validation is not guaranteed if this is done.\n\n## Requirement\n\n+ Go version \u003e= 1.11\n\n## Related Repos\n\n+ [pika](https://github.com/Qihoo360/pika)\n\n## Donate\n\nIf you like the project and want to buy me a cola, you can through: \n\n|PayPal|微信|\n|------|---|\n|[![](https://www.paypalobjects.com/webstatic/paypalme/images/pp_logo_small.png)](https://paypal.me/siddontang)|[![](https://github.com/siddontang/blog/blob/master/donate/weixin.png)|\n\n## Feedback\n\n+ Gmail: siddontang@gmail.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fledisdb%2Fledisdb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fledisdb%2Fledisdb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fledisdb%2Fledisdb/lists"}