Each FalkorDB pod's replication role, replication ID and offset, each primary's replicas and how far behind they are, and, with Sentinel, the primary each Sentinel points at and whether a failover quorum is reachable
curl --request GET \
--url http://localhost:3001/api/clusters/{clusterName}/replication \
--cookie token=import requests
url = "http://localhost:3001/api/clusters/{clusterName}/replication"
headers = {"cookie": "token="}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {cookie: 'token='}};
fetch('http://localhost:3001/api/clusters/{clusterName}/replication', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3001",
CURLOPT_URL => "http://localhost:3001/api/clusters/{clusterName}/replication",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_COOKIE => "token=",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:3001/api/clusters/{clusterName}/replication"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("cookie", "token=")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://localhost:3001/api/clusters/{clusterName}/replication")
.header("cookie", "token=")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3001/api/clusters/{clusterName}/replication")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["cookie"] = 'token='
response = http.request(request)
puts response.read_body{
"readAt": "2023-11-07T05:31:56Z",
"topology": "standalone",
"pods": [
{
"pod": "<string>",
"reachable": true,
"shard": "<string>",
"role": "primary",
"replId": "<string>",
"replId2": "<string>",
"offset": 123,
"secondOffset": 123,
"primaryAddress": "<string>",
"linkStatus": "up",
"lastIoSecondsAgo": 123,
"syncInProgress": true,
"replicas": [
{
"address": "<string>",
"state": "<string>",
"offset": 123,
"lagBytes": 123,
"lagSeconds": 123
}
]
}
],
"sentinels": [
{
"pod": "<string>",
"reachable": true,
"masterName": "<string>",
"primaryAddress": "<string>",
"flags": [
"<string>"
],
"quorum": 123,
"otherSentinels": 123,
"replicas": 123,
"quorumReachable": true,
"quorumMessage": "<string>"
}
]
}{
"error": "<string>",
"statusCode": 123,
"message": "<string>"
}{
"error": "<string>",
"statusCode": 123,
"message": "<string>"
}{
"error": "<string>",
"statusCode": 123,
"message": "<string>"
}{
"error": "<string>",
"statusCode": 123,
"message": "<string>"
}Cluster Operations
Each FalkorDB pod's replication role, replication ID and offset, each primary's replicas and how far behind they are, and, with Sentinel, the primary each Sentinel points at and whether a failover quorum is reachable
Each FalkorDB pod’s replication role, replication ID and offset, each primary’s replicas and how far behind they are, and, with Sentinel, the primary each Sentinel points at and whether a failover quorum is reachable. Read by a short read-only Job in the deployment’s namespace, so a read takes a few seconds; nothing is cached.
GET
/
api
/
clusters
/
{clusterName}
/
replication
Each FalkorDB pod's replication role, replication ID and offset, each primary's replicas and how far behind they are, and, with Sentinel, the primary each Sentinel points at and whether a failover quorum is reachable
curl --request GET \
--url http://localhost:3001/api/clusters/{clusterName}/replication \
--cookie token=import requests
url = "http://localhost:3001/api/clusters/{clusterName}/replication"
headers = {"cookie": "token="}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {cookie: 'token='}};
fetch('http://localhost:3001/api/clusters/{clusterName}/replication', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3001",
CURLOPT_URL => "http://localhost:3001/api/clusters/{clusterName}/replication",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_COOKIE => "token=",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:3001/api/clusters/{clusterName}/replication"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("cookie", "token=")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://localhost:3001/api/clusters/{clusterName}/replication")
.header("cookie", "token=")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3001/api/clusters/{clusterName}/replication")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["cookie"] = 'token='
response = http.request(request)
puts response.read_body{
"readAt": "2023-11-07T05:31:56Z",
"topology": "standalone",
"pods": [
{
"pod": "<string>",
"reachable": true,
"shard": "<string>",
"role": "primary",
"replId": "<string>",
"replId2": "<string>",
"offset": 123,
"secondOffset": 123,
"primaryAddress": "<string>",
"linkStatus": "up",
"lastIoSecondsAgo": 123,
"syncInProgress": true,
"replicas": [
{
"address": "<string>",
"state": "<string>",
"offset": 123,
"lagBytes": 123,
"lagSeconds": 123
}
]
}
],
"sentinels": [
{
"pod": "<string>",
"reachable": true,
"masterName": "<string>",
"primaryAddress": "<string>",
"flags": [
"<string>"
],
"quorum": 123,
"otherSentinels": 123,
"replicas": 123,
"quorumReachable": true,
"quorumMessage": "<string>"
}
]
}{
"error": "<string>",
"statusCode": 123,
"message": "<string>"
}{
"error": "<string>",
"statusCode": 123,
"message": "<string>"
}{
"error": "<string>",
"statusCode": 123,
"message": "<string>"
}{
"error": "<string>",
"statusCode": 123,
"message": "<string>"
}Was this page helpful?