Skip to content

Bistard/cpp-redis-cluster-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

cpp-reids-cluster-api

C++ redis cluster API.

Supporting features:

  • sync cluster API
  • async cluster API

Sync cluster API

Intro

Given one of the IP:PORT in the cluster, the API will maintain a connection pool that auto connects all the masters.

The local connection pool is not up-to-dated since it is a sync api.

If the API cannot send command to the master with coressponding hash slot, the API will try to send 'CLUSTER SLOTS' command to the other masters in order to update the local connection pool. If updates succcessed, the API will resend the same command to the correct master.

If it still cannot send out the command, the API will return false.

Async cluster API

Async API shares the same interfaces except some minor changes.

If the master is down, the API will store the failed comamnd, and once that master is considered as timed out by the API, the API will try to update the local connection pool and retry all the failed commands to their correct masters again.

Todo List

  • sync and async cannot handle ASK/MOVED command.

About

C++ redis cluster API.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages