titan

package module
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 9, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

README

Titan

Build Status Go Report Card Coverage Status Coverage Status Discourse status

A distributed implementation of Redis compatible layer based on TiKV

Why Titan?

  • Completely compatible with redis protocol
  • Full distributed transaction with strong consistency
  • Multi-tenancy support
  • No painful scale out
  • High availability

Thanks TiKV for supporting the core features. The project is developed and open sourced by the Beijing Infrastructure Team at Meitu and has been donated to DistributedIO org.

Architecture

titan

Quick start

Can't wait to experiment Titan? Just follow 2 steps:

  1. curl -s -O https://raw.githubusercontent.com/distributedio/titan/master/docker-compose.yml
  2. docker-compose up

Then connect to titan use redis-cli

redis-cli -p 7369

Enjoy!

Installation

SetUp TiKV cluster

Titan works with 2 tidb components:

  • TiKV
  • Pd

To setup TiKV and PD, please follow official instruction

Run Titan
  • Build the binary
go get github.com/distributedio/titan
cd $GOPATH/src/github.com/distributedio/titan
make 
  • Edit the configration file
pd-addrs="tikv://your-pd-addrs:port"
  • Run titan
./titan

For more details about Deploy Titan, click here.

Benchmarks

Refer to the benchmark docs for more details. It is shared on Baidu Disks, use the code hzt6 to gain the permission.

Basic benchmarking result.

Get

Get command benchmark

Set

Set command benchmark

For more info, please vist here Titan Benchmarks

Commands supporting status

For fully supported command list vist here

command status
Connections Won't Fully Supported
Transactions Supported
Server Not Fully Supported Yet
Keys Supported
Strings Not Fully Supported Yet
List Not Fully Supported Yet
Hashes Supported
Sets Not Fully Supported Yet
Sorted Sets Not Fully Supported Yet
Geo Not Supported Yet
Hyperloglog Not Supported Yet
Pub/Sub Not Supported Yet
Scripting Not Supported Yet
Streams Not Supported Yet

FAQ

FAQ

Roadmap

View our Roadmap

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateTraceID

func GenerateTraceID() string

GenerateTraceID grenerates a traceid for once a request

func GetClientID

func GetClientID() func() int64

GetClientID starts with 1 and allocates clientID incrementally

func PrintVersionInfo

func PrintVersionInfo()

PrintVersionInfo prints the server version info

Types

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server implements the redis prototol server

func New

func New(ctx *context.ServerContext) *Server

New a server instance

func (*Server) GracefulStop

func (s *Server) GracefulStop() error

GracefulStop the server, TODO close clients connections first

func (*Server) ListenAndServe

func (s *Server) ListenAndServe(addr string) error

ListenAndServe serves on a specified address

func (*Server) Serve

func (s *Server) Serve(lis net.Listener) error

Serve the redis requests

func (*Server) Stop

func (s *Server) Stop() error

Stop the server

Directories

Path Synopsis
bin
db
zlistproto
Package zlistproto is a generated protocol buffer package.
Package zlistproto is a generated protocol buffer package.
tools

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL