Skip to content

Commit f747044

Browse files
John SullyGitHub Enterprise
authored andcommitted
Merge pull request #70 from Snapchat/update_readme
Update readme & remove Enterprise references
2 parents 481ab76 + 1b22ceb commit f747044

4 files changed

Lines changed: 56 additions & 42 deletions

File tree

README.md

Lines changed: 52 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,20 @@
22
![CI](https://github.com/JohnSully/KeyDB/workflows/CI/badge.svg?branch=unstable)
33
[![StackShare](http://img.shields.io/badge/tech-stack-0690fa.svg?style=flat)](https://stackshare.io/eq-alpha-technology-inc/eq-alpha-technology-inc)
44

5+
##### KeyDB is now a part of Snap Inc! Check out the announcement [here](https://docs.keydb.dev/news/2022/05/12/keydb-joins-snap)
6+
7+
##### [Release v6.3.0](https://github.com/EQ-Alpha/KeyDB/releases/tag/v6.3.0) is here with major improvements as we consolodate our Open Source and Enterprise offerings into a single BSD-3 licensed project. See our [roadmap](https://docs.keydb.dev/docs/coming-soon) for details.
8+
59
##### Want to extend KeyDB with Javascript? Try [ModJS](https://github.com/JohnSully/ModJS)
610

711
##### Need Help? Check out our extensive [documentation](https://docs.keydb.dev).
812

9-
##### NEW!!! KeyDB now has a Slack Community Workspace. Click [here](https://docs.keydb.dev/slack/) to learn more and join the KeyDB Community Slack workspace.
13+
##### KeyDB is on Slack. Click [here](https://docs.keydb.dev/slack/) to learn more and join the KeyDB Community Slack workspace.
1014

1115
What is KeyDB?
1216
--------------
1317

14-
KeyDB is a high performance fork of Redis with a focus on multithreading, memory efficiency, and high throughput. In addition to multithreading, KeyDB also has features only available in Redis Enterprise such as [Active Replication](https://github.com/JohnSully/KeyDB/wiki/Active-Replication), [FLASH storage](https://github.com/JohnSully/KeyDB/wiki/FLASH-Storage) support, and some not available at all such as direct backup to AWS S3.
18+
KeyDB is a high performance fork of Redis with a focus on multithreading, memory efficiency, and high throughput. In addition to performance improvements, KeyDB offers features such as Active Replication, FLASH Storage and Subkey Expires. KeyDB has a MVCC architecture that allows you to execute queries such as KEYS and SCAN without blocking the database and degrading performance.
1519

1620
KeyDB maintains full compatibility with the Redis protocol, modules, and scripts. This includes the atomicity guarantees for scripts and transactions. Because KeyDB keeps in sync with Redis development KeyDB is a superset of Redis functionality, making KeyDB a drop in replacement for existing Redis deployments.
1721

@@ -30,48 +34,75 @@ KeyDB has a different philosophy on how the codebase should evolve. We feel tha
3034

3135
Because of this difference of opinion features which are right for KeyDB may not be appropriate for Redis. A fork allows us to explore this new development path and implement features which may never be a part of Redis. KeyDB keeps in sync with upstream Redis changes, and where applicable we upstream bug fixes and changes. It is our hope that the two projects can continue to grow and learn from each other.
3236

37+
Project Support
38+
-------------------
39+
40+
The KeyDB team maintains this project as part of Snap Inc. KeyDB is used by Snap as part of its caching infrastructure and is fully open sourced. There is no separate commercial product and no paid support options available. We really value collaborating with the open source community and welcome PRs, bug reports, and open discussion. For community support or to get involved further with the project check out our community support options [here](https://docs.keydb.dev/docs/support) (slack, forum, meetup, github issues). Our team monitors these channlels regularly.
41+
42+
3343
Additional Resources
3444
--------------------
3545

36-
Check out KeyDB's [Docker Image](https://hub.docker.com/r/eqalpha/keydb)
46+
Try the KeyDB [Docker Image](https://hub.docker.com/r/eqalpha/keydb)
3747

3848
Join us on [Slack](https://docs.keydb.dev/slack/)
3949

40-
Post to the [Community Forum](https://community.keydb.dev)
50+
Learn more using KeyDB's extensive [documentation](https://docs.keydb.dev)
4151

42-
Learn more through KeyDB's [Documentation & Learning Center](https://docs.keydb.dev)
52+
Post to our [Community Forum](https://community.keydb.dev)
53+
54+
See the [KeyDB Roadmap](https://docs.keydb.dev/docs/coming-soon) to see what's in store
4355

4456

4557
Benchmarking KeyDB
4658
------------------
4759

48-
Please note keydb-benchmark and redis-benchmark are currently single threaded and too slow to properly benchmark KeyDB. We recommend using a redis cluster benchmark tool such as [memtier](https://github.com/RedisLabs/memtier_benchmark). Please ensure your machine has enough cores for both KeyDB and memteir if testing locally. KeyDB expects exclusive use of any cores assigned to it.
60+
Please note keydb-benchmark and redis-benchmark are currently single threaded and too slow to properly benchmark KeyDB. We recommend using a redis cluster benchmark tool such as [memtier](https://github.com/RedisLabs/memtier_benchmark). Please ensure your machine has enough cores for both KeyDB and memtier if testing locally. KeyDB expects exclusive use of any cores assigned to it.
4961

50-
For more details on how we benchmarked KeyDB along with performance numbers check out our blog post: [Redis Should Be Multithreaded](https://medium.com/@john_63123/redis-should-be-multi-threaded-e28319cab744?source=friends_link&sk=7ce8e9fe3ec8224a4d27ef075d085457)
5162

5263
New Configuration Options
5364
-------------------------
5465

55-
With new features comes new options:
66+
With new features comes new options. All other configuration options behave as you'd expect. Your existing configuration files should continue to work unchanged.
5667

68+
```
5769
server-threads N
5870
server-thread-affinity [true/false]
71+
```
72+
The number of threads used to serve requests. This should be related to the number of queues available in your network hardware, *not* the number of cores on your
73+
machine. Because KeyDB uses spinlocks to reduce latency; making this too high will reduce performance. We recommend using 4 here. By default this is set to two.
5974

60-
The number of threads used to serve requests. This should be related to the number of queues available in your network hardware, *not* the number of cores on your machine. Because KeyDB uses spinlocks to reduce latency; making this too high will reduce performance. We recommend using 4 here. By default this is set to one.
61-
62-
scratch-file-path /path
75+
```
76+
min-clients-per-thread 50
77+
```
78+
The minimum number of clients on a thread before KeyDB assigns new connections to a different thread. Tuning this parameter is a tradeoff between locking overhead and distributing the workload over multiple cores
6379

64-
If you would like to use the [FLASH backed](https://github.com/JohnSully/KeyDB/wiki/FLASH-Storage) storage this option configures the directory for KeyDB's temporary files. This feature relies on snapshotting to work so must be used on a BTRFS filesystem. ZFS may also work but is untested. With this feature KeyDB will use RAM as a cache and page to disk as necessary. NOTE: This requires special compilation options, see Building KeyDB below.
65-
66-
db-s3-object /path/to/bucket
80+
```
81+
replica-weighting-factor 2
82+
```
83+
KeyDB will attempt to balance clients across threads evenly; However, replica clients are usually much more expensive than a normal client, and so KeyDB will try to assign fewer clients to threads with a replica. The weighting factor below is intented to help tune this behavior. A replica weighting factor of 2 means we treat a replica as the equivalent of two normal clients. Adjusting this value may improve performance when replication is used. The best weighting is workload specific - e.g. read heavy workloads should set this to 1. Very write heavy workloads may benefit from higher numbers.
6784

68-
If you would like KeyDB to dump and load directly to AWS S3 this option specifies the bucket. Using this option with the traditional RDB options will result in KeyDB backing up twice to both locations. If both are specified KeyDB will first attempt to load from the local dump file and if that fails load from S3. This requires the AWS CLI tools to be installed and configured which are used under the hood to transfer the data.
85+
```
86+
active-client-balancing yes
87+
```
88+
Should KeyDB make active attempts at balancing clients across threads? This can impact performance accepting new clients. By default this is enabled. If disabled there is still a best effort from the kernel to distribute across threads with SO_REUSEPORT but it will not be as fair. By default this is enabled
6989

90+
```
7091
active-replica yes
71-
92+
```
7293
If you are using active-active replication set `active-replica` option to “yes”. This will enable both instances to accept reads and writes while remaining synced. [Click here](https://docs.keydb.dev/docs/active-rep/) to see more on active-rep in our docs section. There are also [docker examples]( https://docs.keydb.dev/docs/docker-active-rep/) on docs.
7394

74-
All other configuration options behave as you'd expect. Your existing configuration files should continue to work unchanged.
95+
```
96+
multi-master-no-forward no
97+
```
98+
Avoid forwarding RREPLAY messages to other masters? WARNING: This setting is dangerous! You must be certain all masters are connected to eachother in a true mesh topology or data loss will occur! This command can be used to reduce multimaster bus traffic
99+
100+
101+
```
102+
scratch-file-path /path
103+
```
104+
If you would like KeyDB to dump and load directly to AWS S3 this option specifies the bucket. Using this option with the traditional RDB options will result in KeyDB backing up twice to both locations. If both are specified KeyDB will first attempt to load from the local dump file and if that fails load from S3. This requires the AWS CLI tools to be installed and configured which are used under the hood to transfer the data.
105+
75106

76107
Building KeyDB
77108
--------------
@@ -104,6 +135,10 @@ To append a suffix to KeyDB program names, use:
104135
***Note that the following dependencies may be needed:
105136
% sudo apt-get install autoconf autotools-dev libnuma-dev libtool
106137

138+
To buik=ld with TLS support, use:
139+
140+
% make BUILD_TLS=yes
141+
107142
Running the tests with TLS enabled (you will need `tcl-tls`
108143
installed):
109144

@@ -270,24 +305,6 @@ KeyDB works by running the normal Redis event loop on multiple threads. Network
270305

271306
Unlike most databases the core data structure is the fastest part of the system. Most of the query time comes from parsing the REPL protocol and copying data to/from the network.
272307

273-
Future work:
274-
- Allow rebalancing of connections to different threads after the connection
275-
- Allow multiple readers access to the hashtable concurrently
276-
277-
Docker Build
278-
------------
279-
Build the latest binaries from the github unstable branch within a docker container. Note this is built for Ubuntu 18.04.
280-
Simply make a directory you would like to have the latest binaries dumped in, then run the following commmand with your updated path:
281-
```
282-
$ docker run -it --rm -v /path-to-dump-binaries:/keydb_bin eqalpha/keydb-build-bin
283-
```
284-
You should receive the following files: keydb-benchmark, keydb-check-aof, keydb-check-rdb, keydb-cli, keydb-sentinel, keydb-server
285-
286-
If you are looking to enable flash support with the build (make MALLOC=memkind) then use the following command:
287-
```
288-
$ docker run -it --rm -v /path-to-dump-binaries:/keydb_bin eqalpha/keydb-build-bin:flash
289-
```
290-
Please note that you will need libcurl4-openssl-dev in order to run keydb. With flash version you may need libnuma-dev and libtool installed in order to run the binaries. Keep this in mind especially when running in a container. For a copy of all our Dockerfiles, please see them on [docs]( https://docs.keydb.dev/docs/dockerfiles/).
291308

292309
Code contributions
293310
-----------------

pkg/rpm/keydb_build/keydb.spec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ getent group keydb &> /dev/null || \
2727
groupadd -r keydb &> /dev/null
2828
getent passwd keydb &> /dev/null || \
2929
useradd -r -g keydb -d /var/lib/keydb -s /sbin/nologin \
30-
-c 'KeyDB Enterprise Database Server' keydb &> /dev/null
30+
-c 'KeyDB Database Server' keydb &> /dev/null
3131
exit 0
3232

3333
#postinstall scriptlet (using /bin/sh):

src/asciilogo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const char *ascii_logo =
3232
" _ \n"
3333
" _-(+)-_ \n"
3434
" _-- / \\ --_ \n"
35-
" _-- / \\ --_ KeyDB Enterprise %s (%s/%d) %s bit \n"
35+
" _-- / \\ --_ KeyDB %s (%s/%d) %s bit \n"
3636
" __-- / \\ --__ \n"
3737
" (+) _ / \\ _ (+) Running in %s mode\n"
3838
" | -- / \\ -- | Port: %d\n"

src/server.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@
7373
#endif
7474

7575
int g_fTestMode = false;
76-
const char *motd_url = "http://api.keydb.dev/motd/motd_server_pro.txt";
77-
const char *motd_cache_file = "/.keydb-enterprise-server-motd";
76+
const char *motd_url = "http://api.keydb.dev/motd/motd_server.txt";
77+
const char *motd_cache_file = "/.keydb-server-motd";
7878

7979
/* Our shared "common" objects */
8080

@@ -6272,10 +6272,7 @@ sds genRedisInfoString(const char *section) {
62726272
if (sections++) info = sdscat(info,"\r\n");
62736273
info = sdscatprintf(info,
62746274
"# KeyDB\r\n"
6275-
"variant:enterprise\r\n"
6276-
"license_status:%s\r\n"
62776275
"mvcc_depth:%d\r\n",
6278-
"OK",
62796276
mvcc_depth
62806277
);
62816278
}

0 commit comments

Comments
 (0)