使用 KMS 的 AWS RDS 加密是否会影响性能?

Does AWS RDS encryption with KMS affect performance?

亚马逊 states

Encryption and decryption are handled transparently so you don’t have to modify your application to access your data

我的应用程序(Rails、MySQL、Elasticsearch)构建了大量图形,因此查询了大量数据。从我之前的数据库加密经验来看,它确实影响了数据检索速度(因为我们只能说记录在读取和解密后是否符合条件)。

是否有相关的基准?或者您可能使用过 AWS 的此类服务器端加密?我是否需要担心性能变化?

我也不太清楚是否可以用相同的 'transparent' 方式加密 Elasticsearch 数据。我也会采纳你的建议

From my prior experience with database encryption, it really affects data retrieving speed (as we can only say if record matches condition after reading and decryptng it).

如果每条记录的每个值在插入数据库之前都经过加密,就会出现这种情况。这不是 RDS 加密的工作原理。 RDS 加密通过对存储数据库的 EBS 卷启用加密来工作。对于 RDS 数据库引擎,数据似乎没有加密。这与在附加到 EC2 服务器的 EBS 卷上启用加密相同。

关于性能,我没有注意到在 RDS 和 EBS 上启用加密时性能有任何下降。根据 AWS 文档 here

you can expect the same IOPS performance on encrypted volumes as you would with unencrypted volumes, with a minimal effect on latency.


请注意,这是 "encryption at rest"。如果您还需要数据为 "encrypted in transit",那么您将需要考虑对所有数据库连接使用 SSL 连接,并可能在数据库中启用一个设置以强制执行 SSL 连接。


关于您的第二个问题,AWS 目前似乎不支持 ElasticSearch 服务的静态加密。对于传输中加密,您可以使用 HTTPS 连接,根据 AWS Support 对 this question:

的响应

You can use https for encrypted communication with your domain.

Communication between nodes is not encrypted. The nodes themselves are hosted within our VPC, and all communication between nodes remains within it.