InfoGrab Docs

Redis Cluster를 사용한 데이터베이스 접근

요약

Redis 스탠드얼론을 구성하려면 Redis를 사용한 데이터베이스 접근을 참조하십시오. Teleport can provide secure access to Redis cluster via the Teleport Database Service.

Redis 스탠드얼론을 구성하려면 Redis를 사용한 데이터베이스 접근을 참조하십시오.

Teleport can provide secure access to Redis cluster via the Teleport Database Service. This allows for fine-grained access control through the Teleport RBAC system.

The Teleport Database Service proxies traffic from database clients to self-hosted databases in your infrastructure. Teleport maintains a certificate authority (CA) for database clients. You configure your database to trust the Teleport database client CA, and the Teleport Database Service presents certificates signed by this CA when proxying user traffic. With this setup, there is no need to store long-lived credentials for self-hosted databases.

Meanwhile, the Teleport Database Service verifies self-hosted databases by checking their TLS certificates against either the Teleport database CA or a custom CA used with the database.

In this guide, you will:

  1. Configure your Redis cluster database for Teleport access.
  2. Add the database to your Teleport cluster.
  3. Connect to the database via Teleport.

동작 원리#

The Teleport Database Service authenticates to your self-hosted Redis cluster database using mutual TLS. Redis cluster trusts the Teleport certificate authority for database clients, and presents a certificate signed by either the Teleport database CA or a custom CA. When a user initiates a database session, the Teleport Database Service presents a certificate signed by Teleport. The authenticated connection then proxies client traffic from the user.

셀프 호스팅 Teleport 클러스터에 Redis Cluster 등록

클라우드 호스팅 Teleport 클러스터에 Redis Cluster 등록

사전 요구사항#

  • A running Teleport cluster. If you want to get started with Teleport, sign up for a free trial or set up a demo environment.

  • The tctl and tsh clients.

    Installing `tctl` and `tsh` clients
    1. Determine the version of your Teleport cluster. The tctl and tsh clients must be at most one major version behind your Teleport cluster version. Send a GET request to the Proxy Service at /v1/webapi/find and use a JSON query tool to obtain your cluster version. Replace with the web address of your Teleport Proxy Service:

      $ TELEPORT_DOMAIN=
      $ TELEPORT_VERSION="$(curl -s https://$TELEPORT_DOMAIN/v1/webapi/find | jq -r '.server_version')"
      
    2. Follow the instructions for your platform to install tctl and tsh clients:

  • Redis 버전 6.0 이상.

    Note

RESP3 (REdis Serialization Protocol)은 현재 지원되지 않습니다.

Why do I need my own CA? Distributed databases like Redis Cluster use mTLS for node-to-node communication. Teleport requires that you have your own CA to issue certificates for node-to-node mTLS communication.

Teleport uses a split-CA architecture for database access. The Teleport db CA issues server certificates and the db_client CA issues client certificates.

Databases are configured to trust the Teleport db_client CA for client authentication, but not the db CA. Additionally, Teleport only issues ephemeral db_client CA certificates.

When a Redis Cluster node connects to another Redis Cluster node, it must present a certificate that the other node trusts for client authentication. Since Teleport does not issue long-lived db_client certificates, the node needs to have a long-lived certificate issued by another CA that its peer node trusts.

The split db and db_client CA architecture was introduced as a security fix in Teleport versions (= db_client_ca.released_version.v14 =) and (= db_client_ca.released_version.v15 =).

See Database CA Migrations for more information.

To check that you can connect to your Teleport cluster, sign in with tsh login, then verify that you can run tctl commands using your current credentials.

For example, run the following command, assigning to the domain name of the Teleport Proxy Service in your cluster and to your Teleport username:

$ tsh login --proxy= --user=
$ tctl status
# Cluster  (=teleport.url=)
# Version  (=teleport.version=)
# CA pin   (=presets.ca_pin=)

If you can connect to the cluster and run the tctl status command, you can use your current credentials to run subsequent tctl commands from your workstation. If you host your own Teleport cluster, you can also run tctl commands on the computer that hosts the Teleport Auth Service for full permissions.

1/6단계. Teleport Database Service 설정#

The Database Service requires a valid join token to join your Teleport cluster. Run the following tctl command and save the token output in /tmp/token on the server that will run the Database Service:

$ tctl tokens add --type=db --format=text
(=presets.tokens.first=)

Teleport Database Service를 실행할 위치에 Teleport를 설치하고 구성합니다:

To install a Teleport Agent on your Linux server:

The recommended installation method is the cluster install script. It will select the correct version, edition, and installation mode for your cluster.

  1. Assign to your Teleport cluster hostname and port, but not the scheme (https://).

  2. Run your cluster's install script:

    $ curl "https:///scripts/install.sh" | sudo bash
    

On the host where you will run the Teleport Database Service, start Teleport with the appropriate configuration.

Note that a single Teleport process can run multiple different services, for example multiple Database Service agents as well as the SSH Service or Application Service. The step below will overwrite an existing configuration file, so if you're running multiple services add --output=stdout to print the config in your terminal, and manually adjust /etc/teleport.yaml.

Generate a configuration file at /etc/teleport.yaml for the Database Service:

(!docs/pages/includes/start-teleport.mdx service="the Teleport Database Service"!)

Teleport는 Kubernetes 클러스터에 Teleport Database Service를 설치하기 위한 Helm 차트를 제공합니다.

Configure Helm to fetch Teleport charts from the Teleport Helm repository:

$ helm repo add teleport (=teleport.helm_repo_url=)

Refresh the local Helm cache by fetching the latest charts:

$ helm repo update

Make sure that the Teleport Agent pod is running. You should see one teleport-kube-agent pod with a single ready container:

$ kubectl -n teleport-agent get pods
NAME                    READY   STATUS    RESTARTS   AGE
teleport-kube-agent-0   1/1     Running   0          32s

(!docs/pages/includes/database-access/multiple-instances-tip.mdx !)

2/6단계. Teleport 사용자 생성#

Flag Description
--roles List of roles to assign to the user. The builtin access role allows them to connect to any database server registered with Teleport.
--db-users List of database usernames the user will be allowed to use when connecting to the databases. A wildcard allows any user.
--db-names List of logical databases (aka schemas) the user will be allowed to connect to within a database server. A wildcard allows any database.

For more detailed information about database access controls and how to restrict access see RBAC documentation.

3/6단계. Redis 사용자 생성#

Each Redis user must be protected by a strong password. We recommend using OpenSSL to generate passwords:

openssl rand -hex 32

Create a users.acl file, which defines users for your Redis deployment, passwords required to log in as a given user, and sets of ACL rules. Redis allows you to provide passwords in plaintext or an SHA256 hash. We strongly recommend using an SHA256 hash instead of plaintext passwords.

You can use the command below to generate an SHA256 hash from a password.

echo -n STRONG_GENERATED_PASSWORD | sha256sum
user alice on #57639ed88a85996453555f22f5aa4147b4c9614056585d931e5d976f610651e9 allcommands allkeys
user default off

For more ACL examples refer to the Redis documentation.

4/6단계. 상호 TLS 설정#

Teleport 클러스터의 db_client CA 인증서를 내보내고 Redis Cluster의 CA 인증서(PEM 형식)와 연결하여 에 CA 인증서 경로를 할당합니다:

$ tctl auth export --type=db-client > db-client-ca.crt
$ cat  db-client-ca.crt > pem-bundle.cas

Redis Cluster의 CA를 사용하여 각 Redis Cluster 노드에 대한 server.crt를 발급하고 redis.conf 구성 파일에서 상호 TLS를 활성화한 다음 각 노드를 재시작합니다:

tls-port 7001
port 0
cluster-enabled yes
tls-replication yes
tls-cluster yes
aclfile /path/to/users.acl
masterauth GENERATED_STRONG_PASSWORD
masteruser replica-user
tls-cert-file /usr/local/etc/redis/certs/server.crt
tls-key-file /usr/local/etc/redis/certs/server.key
tls-ca-cert-file /usr/local/etc/redis/certs/pem-bundle.cas
tls-protocols "TLSv1.2 TLSv1.3"

상호 TLS가 활성화되면 유효한 클라이언트 인증서 없이는 더 이상 클러스터에 연결할 수 없습니다. tls-auth-clients optional 설정을 사용하면 인증서를 제공하지 않는 클라이언트의 연결을 허용할 수 있습니다.

자세한 내용은 Redis 문서의 TLS 지원을 참조하십시오.

Modify the Teleport Database Service to trust your Redis Cluster CA, assigning to the path to your CA certificate:

  databases:
  - name: "example-redis"
    protocol: "redis"
    uri: "rediss://redis.example.com:6379?mode=cluster"
    static_labels:
      "env": "example"
    tls:
      ca_cert_file: ""

Now the Teleport Database Service will trust certificates presented by your Redis Cluster.

5/6단계. 클러스터 생성#

상호 TLS가 활성화된 후 클러스터를 생성하려면 Redis 노드가 클라이언트 인증에 신뢰하는 인증서를 사용해야 합니다. 노드 중 하나에 이미 발급된 인증서(예: server.crt)를 사용하거나 Redis Cluster CA를 사용하여 새 클라이언트 인증서를 발급할 수 있습니다.

다음 명령을 사용하여 클러스터를 생성합니다. redis-cli --cluster create는 IP 주소만 허용합니다.

$ export REDISCLI_AUTH=STRONG_GENERATED_PASSWORD
$ export CERTS_DIR=/path/to/certs/
$ export IP1=10.0.0.1 # 실제 노드 1 IP로 업데이트
$ export IP2=10.0.0.2 # 실제 노드 2 IP로 업데이트
$ export IP3=10.0.0.3 # 실제 노드 3 IP로 업데이트
$ export IP4=10.0.0.4 # 실제 노드 4 IP로 업데이트
$ export IP5=10.0.0.5 # 실제 노드 5 IP로 업데이트
$ export IP6=10.0.0.6 # 실제 노드 6 IP로 업데이트
$ redis-cli --user alice --cluster-replicas 1 --tls --cluster-yes \
  --cluster create ${IP1}:7001 ${IP2}:7002 ${IP3}:7003 ${IP4}:7004 ${IP5}:7005 ${IP6}:7006 \
  --cacert ${CERTS_DIR}/ca.crt --key ${CERTS_DIR}/server.key --cert ${CERTS_DIR}/server.crt

6/6단계. 연결#

Teleport에서 Redis 클러스터 모드를 활성화하려면 Teleport Database Service 구성 파일의 연결 URI에 mode=cluster 매개변수를 추가합니다.

databases:
  - name: "redis-cluster"
    uri: "rediss://redis.example.com:6379?mode=cluster"

Log into your Teleport cluster and see available databases:

To connect to a particular database instance:

$ tsh db connect example-redis

You can optionally specify the database user to use by default when connecting to the database instance:

$ tsh db connect --db-user=alice example-redis

If flag --db-user is not provided, Teleport logs in as the default user.

Now you can log in as the previously created user using the below command:

AUTH alice STRONG_GENERATED_PASSWORD

To log out of the database and remove credentials:

# Remove credentials for a particular database instance.
$ tsh db logout example-redis
# Remove credentials for all database instances.
$ tsh db logout

지원되는 Redis Cluster 명령어#

클러스터 모드의 Redis는 다음 명령어를 지원하지 않습니다. 위에 나열된 명령어 중 하나가 호출되면 Teleport는 ERR Teleport: command not supported 오류를 반환합니다.

지원되지 않는 명령어 - `ACL` - `ASKING` - `CLIENT` - `CLUSTER` - `CONFIG` - `DEBUG` - `EXEC` - `HELLO` - `INFO` - `LATENCY` - `MEMORY` - `MIGRATE` - `MODULE` - `MONITOR` - `MULTI` - `PFDEBUG` - `PFSELFTEST` - `PSUBSCRIBE` - `PSYNC` - `PUNSUBSCRIBE` - `PUNSUBSCRIBE` - `READONLY` - `READWRITE` - `REPLCONF` - `REPLICAOF` - `ROLE` - `SCAN` - `SCRIPT DEBUG` - `SCRIPT KILL` - `SHUTDOWN` - `SLAVEOF` - `SLOWLOG` - `SSUBSCRIBE` - `SUNSUBSCRIBE` - `SYNC` - `TIME` - `WAIT` - `WATCH`

Teleport는 Redis Cluster와 통신하기 전에 다음 명령어에 대해 추가 처리를 수행합니다:

명령어 설명
DBSIZE 모든 노드에 쿼리를 보내고 전체 클러스터의 키 수를 반환합니다.
KEYS 모든 노드에 쿼리를 보내고 전체 클러스터의 모든 키 목록을 반환합니다.
MGET 명령어를 여러 GET으로 변환하여 여러 노드로 보냅니다. 결과는 Teleport에서 병합되어 클라이언트로 반환됩니다. Teleport가 최소 하나의 키를 가져오지 못하면 오류가 반환됩니다.
FLUSHDB 모든 노드에 쿼리를 보냅니다.
FLUSHALL FLUSHDB와 동일하게 작동합니다.
SCRIPT EXISTS 모든 노드에 쿼리를 보냅니다. 모든 노드에 스크립트가 있는 경우에만 1이 반환됩니다.
SCRIPT LOAD 모든 노드에 스크립트를 보냅니다.
SCRIPT FLUSH 모든 노드에 쿼리를 보냅니다. ASYNC 매개변수는 무시됩니다.

다음 단계#

Redis Cluster를 사용한 데이터베이스 접근

원문 보기
요약

Redis 스탠드얼론을 구성하려면 Redis를 사용한 데이터베이스 접근을 참조하십시오. Teleport can provide secure access to Redis cluster via the Teleport Database Service.

Redis 스탠드얼론을 구성하려면 Redis를 사용한 데이터베이스 접근을 참조하십시오.

Teleport can provide secure access to Redis cluster via the Teleport Database Service. This allows for fine-grained access control through the Teleport RBAC system.

The Teleport Database Service proxies traffic from database clients to self-hosted databases in your infrastructure. Teleport maintains a certificate authority (CA) for database clients. You configure your database to trust the Teleport database client CA, and the Teleport Database Service presents certificates signed by this CA when proxying user traffic. With this setup, there is no need to store long-lived credentials for self-hosted databases.

Meanwhile, the Teleport Database Service verifies self-hosted databases by checking their TLS certificates against either the Teleport database CA or a custom CA used with the database.

In this guide, you will:

  1. Configure your Redis cluster database for Teleport access.
  2. Add the database to your Teleport cluster.
  3. Connect to the database via Teleport.

동작 원리#

The Teleport Database Service authenticates to your self-hosted Redis cluster database using mutual TLS. Redis cluster trusts the Teleport certificate authority for database clients, and presents a certificate signed by either the Teleport database CA or a custom CA. When a user initiates a database session, the Teleport Database Service presents a certificate signed by Teleport. The authenticated connection then proxies client traffic from the user.

셀프 호스팅 Teleport 클러스터에 Redis Cluster 등록

클라우드 호스팅 Teleport 클러스터에 Redis Cluster 등록

사전 요구사항#

  • A running Teleport cluster. If you want to get started with Teleport, sign up for a free trial or set up a demo environment.

  • The tctl and tsh clients.

    Installing `tctl` and `tsh` clients
    1. Determine the version of your Teleport cluster. The tctl and tsh clients must be at most one major version behind your Teleport cluster version. Send a GET request to the Proxy Service at /v1/webapi/find and use a JSON query tool to obtain your cluster version. Replace with the web address of your Teleport Proxy Service:

      $ TELEPORT_DOMAIN=
      $ TELEPORT_VERSION="$(curl -s https://$TELEPORT_DOMAIN/v1/webapi/find | jq -r '.server_version')"
      
    2. Follow the instructions for your platform to install tctl and tsh clients:

  • Redis 버전 6.0 이상.

    Note

RESP3 (REdis Serialization Protocol)은 현재 지원되지 않습니다.

Why do I need my own CA? Distributed databases like Redis Cluster use mTLS for node-to-node communication. Teleport requires that you have your own CA to issue certificates for node-to-node mTLS communication.

Teleport uses a split-CA architecture for database access. The Teleport db CA issues server certificates and the db_client CA issues client certificates.

Databases are configured to trust the Teleport db_client CA for client authentication, but not the db CA. Additionally, Teleport only issues ephemeral db_client CA certificates.

When a Redis Cluster node connects to another Redis Cluster node, it must present a certificate that the other node trusts for client authentication. Since Teleport does not issue long-lived db_client certificates, the node needs to have a long-lived certificate issued by another CA that its peer node trusts.

The split db and db_client CA architecture was introduced as a security fix in Teleport versions (= db_client_ca.released_version.v14 =) and (= db_client_ca.released_version.v15 =).

See Database CA Migrations for more information.

To check that you can connect to your Teleport cluster, sign in with tsh login, then verify that you can run tctl commands using your current credentials.

For example, run the following command, assigning to the domain name of the Teleport Proxy Service in your cluster and to your Teleport username:

$ tsh login --proxy= --user=
$ tctl status
# Cluster  (=teleport.url=)
# Version  (=teleport.version=)
# CA pin   (=presets.ca_pin=)

If you can connect to the cluster and run the tctl status command, you can use your current credentials to run subsequent tctl commands from your workstation. If you host your own Teleport cluster, you can also run tctl commands on the computer that hosts the Teleport Auth Service for full permissions.

1/6단계. Teleport Database Service 설정#

The Database Service requires a valid join token to join your Teleport cluster. Run the following tctl command and save the token output in /tmp/token on the server that will run the Database Service:

$ tctl tokens add --type=db --format=text
(=presets.tokens.first=)

Teleport Database Service를 실행할 위치에 Teleport를 설치하고 구성합니다:

To install a Teleport Agent on your Linux server:

The recommended installation method is the cluster install script. It will select the correct version, edition, and installation mode for your cluster.

  1. Assign to your Teleport cluster hostname and port, but not the scheme (https://).

  2. Run your cluster's install script:

    $ curl "https:///scripts/install.sh" | sudo bash
    

On the host where you will run the Teleport Database Service, start Teleport with the appropriate configuration.

Note that a single Teleport process can run multiple different services, for example multiple Database Service agents as well as the SSH Service or Application Service. The step below will overwrite an existing configuration file, so if you're running multiple services add --output=stdout to print the config in your terminal, and manually adjust /etc/teleport.yaml.

Generate a configuration file at /etc/teleport.yaml for the Database Service:

(!docs/pages/includes/start-teleport.mdx service="the Teleport Database Service"!)

Teleport는 Kubernetes 클러스터에 Teleport Database Service를 설치하기 위한 Helm 차트를 제공합니다.

Configure Helm to fetch Teleport charts from the Teleport Helm repository:

$ helm repo add teleport (=teleport.helm_repo_url=)

Refresh the local Helm cache by fetching the latest charts:

$ helm repo update

Make sure that the Teleport Agent pod is running. You should see one teleport-kube-agent pod with a single ready container:

$ kubectl -n teleport-agent get pods
NAME                    READY   STATUS    RESTARTS   AGE
teleport-kube-agent-0   1/1     Running   0          32s

(!docs/pages/includes/database-access/multiple-instances-tip.mdx !)

2/6단계. Teleport 사용자 생성#

Flag Description
--roles List of roles to assign to the user. The builtin access role allows them to connect to any database server registered with Teleport.
--db-users List of database usernames the user will be allowed to use when connecting to the databases. A wildcard allows any user.
--db-names List of logical databases (aka schemas) the user will be allowed to connect to within a database server. A wildcard allows any database.

For more detailed information about database access controls and how to restrict access see RBAC documentation.

3/6단계. Redis 사용자 생성#

Each Redis user must be protected by a strong password. We recommend using OpenSSL to generate passwords:

openssl rand -hex 32

Create a users.acl file, which defines users for your Redis deployment, passwords required to log in as a given user, and sets of ACL rules. Redis allows you to provide passwords in plaintext or an SHA256 hash. We strongly recommend using an SHA256 hash instead of plaintext passwords.

You can use the command below to generate an SHA256 hash from a password.

echo -n STRONG_GENERATED_PASSWORD | sha256sum
user alice on #57639ed88a85996453555f22f5aa4147b4c9614056585d931e5d976f610651e9 allcommands allkeys
user default off

For more ACL examples refer to the Redis documentation.

4/6단계. 상호 TLS 설정#

Teleport 클러스터의 db_client CA 인증서를 내보내고 Redis Cluster의 CA 인증서(PEM 형식)와 연결하여 에 CA 인증서 경로를 할당합니다:

$ tctl auth export --type=db-client > db-client-ca.crt
$ cat  db-client-ca.crt > pem-bundle.cas

Redis Cluster의 CA를 사용하여 각 Redis Cluster 노드에 대한 server.crt를 발급하고 redis.conf 구성 파일에서 상호 TLS를 활성화한 다음 각 노드를 재시작합니다:

tls-port 7001
port 0
cluster-enabled yes
tls-replication yes
tls-cluster yes
aclfile /path/to/users.acl
masterauth GENERATED_STRONG_PASSWORD
masteruser replica-user
tls-cert-file /usr/local/etc/redis/certs/server.crt
tls-key-file /usr/local/etc/redis/certs/server.key
tls-ca-cert-file /usr/local/etc/redis/certs/pem-bundle.cas
tls-protocols "TLSv1.2 TLSv1.3"

상호 TLS가 활성화되면 유효한 클라이언트 인증서 없이는 더 이상 클러스터에 연결할 수 없습니다. tls-auth-clients optional 설정을 사용하면 인증서를 제공하지 않는 클라이언트의 연결을 허용할 수 있습니다.

자세한 내용은 Redis 문서의 TLS 지원을 참조하십시오.

Modify the Teleport Database Service to trust your Redis Cluster CA, assigning to the path to your CA certificate:

  databases:
  - name: "example-redis"
    protocol: "redis"
    uri: "rediss://redis.example.com:6379?mode=cluster"
    static_labels:
      "env": "example"
    tls:
      ca_cert_file: ""

Now the Teleport Database Service will trust certificates presented by your Redis Cluster.

5/6단계. 클러스터 생성#

상호 TLS가 활성화된 후 클러스터를 생성하려면 Redis 노드가 클라이언트 인증에 신뢰하는 인증서를 사용해야 합니다. 노드 중 하나에 이미 발급된 인증서(예: server.crt)를 사용하거나 Redis Cluster CA를 사용하여 새 클라이언트 인증서를 발급할 수 있습니다.

다음 명령을 사용하여 클러스터를 생성합니다. redis-cli --cluster create는 IP 주소만 허용합니다.

$ export REDISCLI_AUTH=STRONG_GENERATED_PASSWORD
$ export CERTS_DIR=/path/to/certs/
$ export IP1=10.0.0.1 # 실제 노드 1 IP로 업데이트
$ export IP2=10.0.0.2 # 실제 노드 2 IP로 업데이트
$ export IP3=10.0.0.3 # 실제 노드 3 IP로 업데이트
$ export IP4=10.0.0.4 # 실제 노드 4 IP로 업데이트
$ export IP5=10.0.0.5 # 실제 노드 5 IP로 업데이트
$ export IP6=10.0.0.6 # 실제 노드 6 IP로 업데이트
$ redis-cli --user alice --cluster-replicas 1 --tls --cluster-yes \
  --cluster create ${IP1}:7001 ${IP2}:7002 ${IP3}:7003 ${IP4}:7004 ${IP5}:7005 ${IP6}:7006 \
  --cacert ${CERTS_DIR}/ca.crt --key ${CERTS_DIR}/server.key --cert ${CERTS_DIR}/server.crt

6/6단계. 연결#

Teleport에서 Redis 클러스터 모드를 활성화하려면 Teleport Database Service 구성 파일의 연결 URI에 mode=cluster 매개변수를 추가합니다.

databases:
  - name: "redis-cluster"
    uri: "rediss://redis.example.com:6379?mode=cluster"

Log into your Teleport cluster and see available databases:

To connect to a particular database instance:

$ tsh db connect example-redis

You can optionally specify the database user to use by default when connecting to the database instance:

$ tsh db connect --db-user=alice example-redis

If flag --db-user is not provided, Teleport logs in as the default user.

Now you can log in as the previously created user using the below command:

AUTH alice STRONG_GENERATED_PASSWORD

To log out of the database and remove credentials:

# Remove credentials for a particular database instance.
$ tsh db logout example-redis
# Remove credentials for all database instances.
$ tsh db logout

지원되는 Redis Cluster 명령어#

클러스터 모드의 Redis는 다음 명령어를 지원하지 않습니다. 위에 나열된 명령어 중 하나가 호출되면 Teleport는 ERR Teleport: command not supported 오류를 반환합니다.

지원되지 않는 명령어 - `ACL` - `ASKING` - `CLIENT` - `CLUSTER` - `CONFIG` - `DEBUG` - `EXEC` - `HELLO` - `INFO` - `LATENCY` - `MEMORY` - `MIGRATE` - `MODULE` - `MONITOR` - `MULTI` - `PFDEBUG` - `PFSELFTEST` - `PSUBSCRIBE` - `PSYNC` - `PUNSUBSCRIBE` - `PUNSUBSCRIBE` - `READONLY` - `READWRITE` - `REPLCONF` - `REPLICAOF` - `ROLE` - `SCAN` - `SCRIPT DEBUG` - `SCRIPT KILL` - `SHUTDOWN` - `SLAVEOF` - `SLOWLOG` - `SSUBSCRIBE` - `SUNSUBSCRIBE` - `SYNC` - `TIME` - `WAIT` - `WATCH`

Teleport는 Redis Cluster와 통신하기 전에 다음 명령어에 대해 추가 처리를 수행합니다:

명령어 설명
DBSIZE 모든 노드에 쿼리를 보내고 전체 클러스터의 키 수를 반환합니다.
KEYS 모든 노드에 쿼리를 보내고 전체 클러스터의 모든 키 목록을 반환합니다.
MGET 명령어를 여러 GET으로 변환하여 여러 노드로 보냅니다. 결과는 Teleport에서 병합되어 클라이언트로 반환됩니다. Teleport가 최소 하나의 키를 가져오지 못하면 오류가 반환됩니다.
FLUSHDB 모든 노드에 쿼리를 보냅니다.
FLUSHALL FLUSHDB와 동일하게 작동합니다.
SCRIPT EXISTS 모든 노드에 쿼리를 보냅니다. 모든 노드에 스크립트가 있는 경우에만 1이 반환됩니다.
SCRIPT LOAD 모든 노드에 스크립트를 보냅니다.
SCRIPT FLUSH 모든 노드에 쿼리를 보냅니다. ASYNC 매개변수는 무시됩니다.

다음 단계#