Rename main binary to midi-redis

This commit is contained in:
Roman Gershman 2021-11-30 10:11:59 +02:00
parent e7dc509fed
commit 6c5e4dad3b
3 changed files with 27 additions and 7 deletions

View File

@ -1,11 +1,30 @@
# mini-redis # midi-redis
A toy memory store that supports basic commands like `SET` and `GET` for both memcached and redis protocols. A toy memory store that supports basic commands like `SET` and `GET` for both memcached and redis protocols.
In addition, it supports redis `PING` command. In addition, it supports redis `PING` command.
Demo features include: Demo features include:
1. High throughput reaching to millions of QPS on a single node. 1. High throughput reaching millions of QPS on a single node.
2. TLS support 2. TLS support.
3. Pipelining mode that allows reaching order of magnitude higher QPS i.e. 30M qps and higher on a single node. 3. Pipelining mode.
## Building from source
I've tested the build on Ubuntu 21.04+.
```
git clone --recursive https://github.com/romange/midi-redis
cd midi-redis && ./helio/blaze.sh -release
cd build-opt && ninja midi-redis
```
## Running
```
./midi-redis --logtostderr
```
for more options, run `./midi-redis --help`

View File

@ -1,5 +1,5 @@
add_executable(dragonfly dfly_main.cc) add_executable(midi-redis dfly_main.cc)
cxx_link(dragonfly base dragonfly_lib) cxx_link(midi-redis base dragonfly_lib)
add_library(dragonfly_lib command_registry.cc common_types.cc config_flags.cc add_library(dragonfly_lib command_registry.cc common_types.cc config_flags.cc
conn_context.cc db_slice.cc dragonfly_listener.cc conn_context.cc db_slice.cc dragonfly_listener.cc

View File

@ -118,6 +118,7 @@ void Connection::HandleRequests() {
int val = 1; int val = 1;
CHECK_EQ(0, setsockopt(socket_->native_handle(), SOL_TCP, TCP_NODELAY, &val, sizeof(val))); CHECK_EQ(0, setsockopt(socket_->native_handle(), SOL_TCP, TCP_NODELAY, &val, sizeof(val)));
auto ep = socket_->RemoteEndpoint();
std::unique_ptr<tls::TlsSocket> tls_sock; std::unique_ptr<tls::TlsSocket> tls_sock;
if (ctx_) { if (ctx_) {
@ -137,7 +138,7 @@ void Connection::HandleRequests() {
InputLoop(peer); InputLoop(peer);
VLOG(1) << "Closed connection for peer " << socket_->RemoteEndpoint(); VLOG(1) << "Closed connection for peer " << ep;
} }
void Connection::InputLoop(FiberSocketBase* peer) { void Connection::InputLoop(FiberSocketBase* peer) {