Pika

Pika is a NoSQL database compatible with Redis developed by Qihoo's infrastructure team.
Alternatives To Pika
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Redis62,4023a day ago1February 27, 20182,519bsd-3-clauseC
Redis is an in-memory database that persists on disk. The data model is key-value, but many different kind of values are supported: Strings, Lists, Sets, Sorted Sets, Hashes, Streams, HyperLogLogs, Bitmaps.
Codis12,9851612 years ago6September 04, 2018287mitGo
Proxy based Redis cluster solution supporting pipeline and scaling dynamically
Ssdb7,686
2 years ago1February 27, 2018378bsd-3-clauseC++
SSDB - A fast NoSQL database, an alternative to Redis
Pika5,349
a day ago128bsd-3-clauseC++
Pika is a NoSQL database compatible with Redis developed by Qihoo's infrastructure team.
Octosql4,60032 months ago38May 30, 202341mpl-2.0Go
OctoSQL is a query tool that allows you to join, analyse and transform data from multiple databases and file formats using SQL.
Dynomite4,050
8 months ago1December 15, 2021109apache-2.0C
A generic dynamo implementation for different k-v storage engines
Db Tutorial3,677
18 hours ago7cc-by-sa-4.0Java
📚 db-tutorial 是一个数据库教程。
Dotnetguide3,115
a day ago9mitC#
🐱‍🚀【C#/.NET/.NET Core学习、工作、面试指南】记录、收集和总结C#/.NET/.NET Core基础知识、学习路线、开发实战、学习视频、文章、书籍、项目框架、社区组织、开发必备工具、常见面试题、面试须知、简历模板、以及自己在学习和工作中的一些微薄见解。希望能和大家一起学习,共同进步👊【让现在的自己不再迷茫✨,如果本知识库能为您提供帮助,别忘了给予支持哦(关注、点赞、分享)💖】。
Tendis2,557
7 months ago98otherC++
Tendis is a high-performance distributed storage system fully compatible with the Redis protocol.
Nosqlmap2,526
2 months ago4gpl-3.0Python
Automated NoSQL database enumeration and web application exploitation tool.
Alternatives To Pika
Select To Compare


Alternative Project Comparisons
Readme
YnbjQf.png

Build Status Downloads

Stargazers Over Time Contributors Over Time
Stargazers over time Contributor over time

Introduction

Pika is a persistent huge storage service , compatible with the vast majority of redis interfaces (details), including string, hash, list, zset, set and management interfaces. With the huge amount of data stored, redis may suffer for a capacity bottleneck, and pika was born for solving it. Except huge storage capacity, pika also support master-slave mode by slaveof command, including full and partial synchronization. You can also use pika together with twemproxy or codis(pika has supported data migration in codisthanks left2right and fancy-rabbit) for distributed Redis solution

UserList

Qihoo 360game Weibo Garena
Apus Ffan Meituan XES
HX XL GWD DYD
YM XM XL YM
MM VIP LK KS

More

Feature

  • huge storage capacity
  • compatible with redis interface, you can migrate to pika easily
  • support master-slave mode (slaveof)
  • various management interfaces

For developer

Releases

The User can download the binary release from releases or compile the source release.

Compile

Supported platforms

  • linux - CentOS

  • linux - Ubuntu

  • macOS

Dependencies

  • gcc g++, C++17 support (version>=7)
  • make
  • cmake (version>=3.18)
  • autoconf
  • tar

Compile

Upgrade your gcc to version at least 7 to get C++17 support.

  1. Get the source code
  git clone https://github.com/OpenAtomFoundation/pika.git
  1. Checkout the latest release version
  a. exec git tag to get the latest release tag
  b. exec git checkout TAG to switch to the latest version
  1. Compile

Please run the script build.sh before you compile this db to check the environment and build this repo. If the gcc version is later than 7, such as CentOS6 or centOS7, you need to upgrade the gcc version first

Do as follows

  a. sudo yum -y install centos-release-scl
  b. sudo yum -y install devtoolset-7-gcc devtoolset-7-gcc-c++
  c. scl enable devtoolset-7 bash

Please run the script build.sh before you compile this db to check the environment and build this repo.

  ./build.sh

The compilation result is in the 'output' directory.

By default the compilation process is in 'release' mode. If you wanna debug this dbyou need to compile it in 'debug' mode.

  rm -fr output
  cmake -B output -DCMAKE_BUILD_TYPE=Debug
  cd output && make

Extra components like codis or pika_operator could also built by using build.sh.

  # build codis, default target build-all
  ./build.sh codis

  # build codis, but only the codis-proxy
  ./build.sh codis codis-proxy

  # build pika_operator
  ./build.sh operator

Usage

./output/pika -c ./conf/pika.conf

Clean compilation

  If wanna clean up the compilation content, you can choose one of the following two methods as your will.
  1. exec `cd output && make clean` clean pika Compile content
  2. exec `rm -fr output` rebuild cmake (for complete recompilation)

Developing and Debugging with Pika

Dockerization

Run with docker

docker run -d \
  --restart=always \
  -p 9221:9221 \
  -v <log_dir>:/pika/log \
  -v <db_dir>:/pika/db \
  -v <dump_dir>:/pika/dump \
  -v <dbsync_dir>:/pika/dbsync \
  pikadb/pika:v3.3.6

redis-cli -p 9221 "info"

Meaning of dirs:

  • log_dir: Directory to store log files of Pika.
  • db_dir: Directory to store the data of Pika.
  • dump_dir: Directory to stored dump files that generated by command "bgsave".
  • dbsync_dir: Pika db sync path.

Build Image

If you want to build the image yourself, we have provided a script build_docker.sh to simplify this process.

The script accepts several optional arguments:

  • -t tag: Specify the Docker tag for the image. By default, the tag is pikadb/pika:<git tag>.
  • -p platform: Specify the platform for the Docker image. By default is current docker's platform. all, linux/amd64, linux/arm, linux/arm64.
  • --proxy: Use a proxy to download packages to speed up the build process. This is particularly useful if you are in China.
  • --help: Display help information.

Here is an example usage of the script:

./build_docker.sh -p linux/amd64 -t private_registry/pika:latest

Use pika-operator to deploy

You can use the pika-operator to easily deploy pika in a Kubernetes environment.

Please note that this operator is NOT recommended for use in a production environment.

Local Deploy

  1. install MiniKube
  2. deploy pika-operator
cd tools/pika_operator
make minikube-up # run this if you don't have a minikube cluster
make local-deploy
  1. create pika instance
cd tools/pika_operator
kubectl apply -f examples/pika-sample/

# check pika status
kubectl get pika pika-sample

# get pika instance info
kubectl run pika-sample-test --image redis -it --rm --restart=Never \
  -- /usr/local/bin/redis-cli -h pika-sample -p 9221 info

Performance

More details on Performance.

Observability

Metrics

  1. Pika Server Info: system, ip, port, run_id, config file etc.
  2. Pika Data Info: db size, log size, memory usage etc.
  3. Pika Client Info: The number of connected clients.
  4. Pika Stats Info: status information of compact, slot, etc.
  5. Pika Network Info: Incoming and outgoing traffic and rate of client and master-slave replication.
  6. Pika CPU Info: cpu usage.
  7. Pika Replication Info: Status information of master-slave replication, binlog information.
  8. Pika Keyspace Info: key information of five data types.
  9. Pika Command Exec Count Info: command execution count.
  10. Pika Command Execution Time: Time-consuming command execution.
  11. RocksDB Metrics: RocksDB information of five data types, includes Memtable, Block Cache, Compaction, SST File, Blob File etc.

More details on Metrics.

Documents

  1. doc

Contact Us

QQ group: 294254078

Popular Redis Projects
Popular Nosql Projects
Popular Data Storage Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Redis
Nosql
Nosql Database
Rocksdb