• Stars
    star
    181
  • Rank 204,399 (Top 5 %)
  • Language
    Go
  • License
    Apache License 2.0
  • Created over 5 years ago
  • Updated almost 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

基于TiKV的兼容Redis协议的强一致性NoSQL数据库

Tedis

Tedis 是一个基于TiKV的强一致性的兼容redis 协议的NoSQL数据库。

简介

  • 基于TiKV,其兼容redis 的部分数据结构string、hash的大部分接口;
  • 包括支持事务版本的proxy,支持非事务版本的rawproxy,用于调用Tikv 的gc和用于删除过期数据的ttltask。
  • 工作机理是通过Tikv的pd 获取路由信息,然后通过hash的方式将具体的请求发送到指定的server上,通过这种方式将不同的请求发送到不同的节点上。

特点

  • 兼容redis协议。
  • 支持多节点分布式部署,从而减轻代理层的压力和提高代理层的安全性。
  • 支持事务和非事务两种版本。
  • 采用go语言编写。

引用说明

直接引用

  • 该项目中直接引用的项目有go-redis-server。
  • 还有用到的有部分TiDB的代码和包。

使用

编译方式

编译:make, 清除:make clean

参数说明

proxy 参数说明

-v		proxy 版本信息
-port		proxy 提供服务的端口
-conf   	proxy配置文件的文件名
-pd		TiDB的 pd 节点的地址 如:127.0.0.1:2379
-lp		日志保存目录
-ll		proxy 日志打印级别 如:"info"
-kpdays 	日志保留时间 如:"7", 保留7天
-it		是否忽略ttl信息,因为TiKV是采用ttltask 对数据进行清除的,数据的清除不具有实时性,可能read的key已经过期
-ct		链接保持的超时时间
-td		请求超时时间
-pp		prometheus 服务端口

gc 参数说明

-v		gc 的版本信息
-pd		pd的地址信息,gc 的通过pd调用TiDB的gc

ttltask 参数说明

-v		ttltask 版本信息
-fs		当耗时超过改时间时,将停止运行
-pd    		TiDB的 pd 节点的地址 如:127.0.0.1:2379
-lp     	日志保存目录
-ll     	proxy 日志打印级别 如:"info"
-cn		并发数量
-td		请求超时时间
-pp		prometheus 服务端口

运行

rawkvproxy 运行方式

nohup rawkvproxy" \
        -conf "./conf/rawkvproxy.conf" \
        -ct "180" \
        -kpdays "7" \
        -ll "error" \
        -lp "./log/rawkvproxy.log" \
        -pd "127.0.0.1:10001,127.0.0.1:10001,127.0.0.1:10001" \
        -port "6390" \
        -td "1500" \
	-ct 3600 \
	2> "./log/ttltask_stderr.log"

gc 运行方式

nohup bin/gc" -pd "127.0.0.1:10001,127.0.0.1:10001,127.0.0.1:10001" 2> "./log/ttltask_stderr.log"

ttltask 运行方式

nohup ttltask" \
        -cn "5" \
	-fs "1000" \
        -ll "error" \
        -lp "./log/ttltask.log" \
        -pd "127.0.0.1:10001,127.0.0.1:10001,127.0.0.1:10001" \
    	2> "./log/ttltask_stderr.log"

More Repositories

1

UETool

Show/edit any view's attributions on the screen.
Java
3,256
star
2

lancet

A lightweight and fast AOP framework for Android App and SDK developers
Java
2,083
star
3

morjs

基于小程序 DSL(微信、支付宝)的,可扩展的多端研发框架,支持一键将微信或支付宝小程序转换为微信、支付宝、百度、字节、QQ、快手、淘宝、钉钉等小程序 或 Web 应用。
TypeScript
1,400
star
4

Amigo

A hotfix library for Android platform, and not just this...
Java
1,365
star
5

Stinger

Stinger is a high-efficiency library with great compatibility, for aop in Objective-C, using libffi instead of Objective-C message forwarding. It is 20+ times faster than the Aspects, from message-sending to Aspect-oriented code ends.
Objective-C
988
star
6

corvus

A fast and lightweight Redis Cluster Proxy for Redis 3.0
C
791
star
7

Mess

a gradle plugin for minifying activities, services, receivers, providers and custom view
Groovy
682
star
8

Trojan

Trojan is an efficient mobile terminal lightweight log SDK
Java
390
star
9

dna

dna, dart native access. A lightweight dart to native super channel plugin, You can use it to invoke any native code directly in contextual and chained dart code.
Dart
365
star
10

bigkeeper

Efficiency improvement for iOS&Android modular development.
Ruby
212
star
11

Intimate

Intimate 提供了友好的 API 让 java 反射的使用更加简单平滑。 其最核心的价值在于 Intimate 将在编译期对 apk 内部代码的调用进行反射优化,完全免除反射的效率问题,使得反射调用就像普通调用一样快捷且无任何代价。
Java
202
star
12

duang

自动 CMS 生成工具
JavaScript
199
star
13

eleme.github.io

Eleme Developers Homepage
CSS
116
star
14

Sparrow

Vue
79
star
15

mobilists

mobile team blog
JavaScript
57
star
16

thrift-parser

To parse thrift file to a AST.
JavaScript
53
star
17

meepo

Event sourcing and broadcasting for database.
Python
52
star
18

ruskit

Redis cluster administration toolkit
Python
34
star
19

doctor

Metric based in-memory circuit breaker for python
Python
23
star
20

react-context-global-store

A simple global store based on React context
TypeScript
22
star
21

NVMImageMaker

API for chaining image drawing codes in Objc.
Objective-C
19
star
22

node-thrift-protocol

An implementation of thrift-protocol with node.
JavaScript
18
star
23

easyxml

php xml lib
PHP
17
star
24

SparrowSDK-iOS

Objective-C
16
star
25

NVMAspects

C
15
star
26

thrift-php

Mirror of apache thrift php lib
PHP
10
star
27

thrift-client

A nodejs thrift client
JavaScript
8
star
28

python-jianfan-mirror

mirror of https://code.google.com/p/python-jianfan/
Python
4
star
29

SparrowSDK-Android

4
star
30

thrift-tracker

Go
1
star
31

finite

F-init-E
JavaScript
1
star
32

python-geohash-mirror

mirror of https://code.google.com/p/python-geohash/
Python
1
star