[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-08-19 (世界標準時間)。"],[],[],null,["# About in-transit encryption\n\n| **Note:** If you are looking for the Memorystore for Redis Cluster documentation, see [About in-transit encryption](/memorystore/docs/cluster/about-in-transit-encryption).\n\nThis page gives an overview of in-transit encryption for Memorystore for Redis.\n\nFor instructions how to encrypt a connection with in-transit encryption, see [Enabling in-transit encryption](/memorystore/docs/redis/enabling-in-transit-encryption).\n\nMemorystore for Redis only supports TLS protocol versions 1.2 or higher.\n\nIntroduction\n------------\n\nMemorystore for Redis supports encrypting all Redis traffic using the\n[Transport Layer Security (TLS)](https://en.wikipedia.org/wiki/Transport_Layer_Security)\nprotocol. When in-transit encryption is enabled Redis clients communicate\nexclusively across a secure port connection. Redis clients that are not\nconfigured for TLS will be blocked. If you choose to enable in-transit\nencryption you are responsible for ensuring that your Redis client is capable of\nusing the TLS protocol.\n| **Note:** For Standard Tier instances, replicated data is fully encrypted at the network level based on Google Cloud encryption standards.\n\nIn-transit encryption prerequisites\n-----------------------------------\n\nIn order to use in-transit encryption with Memorystore for Redis, you need:\n\n1. A Redis client that supports TLS or a third-party TLS sidecar\n2. A [Certificate Authority](/memorystore/docs/redis/in-transit-encryption#certificate_authority) installed on the client machine accessing your Redis instance\n\nNative TLS was not supported prior to open source Redis version 6.0. As a result,\nnot every Redis client library supports TLS. If you are using a client that does\nnot support TLS, we recommend using the [Stunnel](https://www.stunnel.org/)\nthird-party plugin that enables TLS for your client. See [Securely connecting to a Redis instance using Stunnel and telnet](/memorystore/docs/redis/connecting-redis-instance#securely_connecting_to_a_redis_instance_using_stunnel_and_telnet)\nfor an example of how to connect to a Redis instance with Stunnel.\n\nCertificate Authority\n---------------------\n\nA Redis instance that uses in-transit encryption has one or more unique\nCertificate Authorities (CA) that are used to verify the identity of the server.\nA CA is a string that you must download and install on the client accessing your\nRedis instance. A CA is valid for ten years from the date it is created. In\norder to ensure service continuity, the new CA must be installed on clients of\nthe Redis instance before the previous CA expires.\n\n### Certificate Authority rotation\n\nA CA is valid for 10 years upon instance creation. In addition, a new CA becomes\navailable five years after instance creation.\n\nThe old CA is valid until its expiration date. This gives you a five year window\nin which to [download](/memorystore/docs/redis/enabling-in-transit-encryption#downloading_the_certificate_authority)\nand [install](/memorystore/docs/redis/enabling-in-transit-encryption#installing_a_certificate_authority_on_your_client)\nthe new CA to clients connecting to the Redis instance. After the old CA expires\nyou can uninstall it from clients.\n\nFor instructions on rotating the CA, see [Managing Certificate Authority rotation](/memorystore/docs/redis/enabling-in-transit-encryption#managing_certificate_authority_rotation).\n\n### Server certificate rotation\n\nServer-side certificate rotation occurs every 180 days causing a transient\nconnection drop of a few seconds. You should have retry logic with exponential\nbackoff in place in order to reestablish the connection. Certificate rotation\ndoes not cause a failover for Standard Tier instances.\n\nConnection limits for in-transit encryption\n-------------------------------------------\n\nEnabling in-transit encryption on your Redis instance introduces limits on the\nmaximum number of client connections your instance can have. The limit is\ndependent on your instance size. You should consider increasing the size of your\nRedis instance if you need more connections than what is supported by your\ncurrent capacity tier.\n\n^1^ These connection limits are approximate, and depend on the rate and complexity of Redis commands sent per connection.\n\n### Monitoring connections\n\nSince Redis instances with in-transit encryption have specific connection limits,\nyou should [monitor](/memorystore/docs/redis/monitoring-instances) the\n`redis.googleapis.com/clients/connected` metric to make sure you don't exceed\nthe connection limit. If the limit is surpassed, the Redis instance rejects\nnewly attempted connections. In this circumstance we recommend [scaling up](/memorystore/docs/redis/scaling-instances)\nyour instance to the size that accommodates the required number of connections.\nIf you suspect that idle connections make up a significant number of your\nconnections, you can [proactively terminate these connections](/memorystore/docs/redis/general-best-practices#managing_idle_connections)\nwith the `timeout` configuration parameter.\n\nPerformance impact of enabling in-transit encryption\n----------------------------------------------------\n\nThe in-transit encryption feature encrypts and decrypts data,\nwhich comes with processing overhead. As a result, enabling in-transit\nencryption can reduce performance. Also, when using in-transit encryption, each\nadditional connection comes with as associated resource cost. To determine the\nlatency associated with using in-transit encryption, compare application\nperformance by benchmarking application performance with both a Redis instance\nthat has in-transit encryption enabled and a Redis instance that has it\ndisabled.\n\n### Guidelines for improving performance\n\n- Decrease the number of client connections when possible. Establish and reuse long-running connections rather than creating on-demand short-lived connections.\n- Increase the size of your Memorystore instance (M4 or larger is recommended).\n- Increase the CPU resources of the Memorystore client host machine. Client machines with a higher CPU count yields better performance. If using a Compute Engine VM, we recommend [compute optimized](/compute/docs/machine-types#compute-optimized_machine_type_family) instances.\n- Decrease the payload size associated with application traffic because larger payloads require more round trips.\n\nIn-transit encryption impact on memory usage\n--------------------------------------------\n\nEnabling in-transit encryption reserves some of your Redis instance memory for\nthe feature. All other things being equal, with in-transit encryption enabled,\nthe value for the System Memory Usage Ratio metric is higher because of the\nadditional overhead memory used by the feature.\n\nRedis version 7.0 performance improvements\n------------------------------------------\n\nUsing Redis version 7.0 on Memorystore for Redis improves the performance of\nin-transit encryption. To take advantage of these performance improvements,\nconsider [upgrading your instance](/memorystore/docs/redis/upgrade-redis-version)\nto use Redis version 7.0. By using this version, Memorystore for Redis doesn't\ndrop connections that you use to rotate server certificates or perform update\noperations.\n\nWhat's next\n-----------\n\n- View instructions on [Enabling in-transit encryption](/memorystore/docs/redis/enabling-in-transit-encryption).\n- Read the [AUTH feature overview](/memorystore/docs/redis/auth-overview).\n- View the [permissions](/memorystore/docs/redis/access-control#in-transit_encryption_permissions) needed in order to perform in-transit encryption management tasks.\n- Learn how to [connect](/memorystore/docs/redis/connecting-redis-instance#securely_connecting_to_a_redis_instance_using_stunnel_and_telnet) to a Redis instance that has in-transit encryption enabled."]]