istio.io/content/zh/faq/applications/cassandra.md

14 lines
1.3 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: 可以在 Istio mesh 中运行 Casandra 吗?
description: 如何在 Istio 上运行 Cassandra。
weight: 50
keywords: [cassandra]
---
默认情况下Cassandra 广播用于绑定(接受连接)到其他 Cassandra 节点的地址作为其地址。这通常是 Pod IP 地址无需服务网格即可正常工作。但是对于服务网格此配置不起作用。Istio 和其他服务网格需要 `localhost` `127.0.0.1`)作为绑定地址。
有两个配置参数要注意:
[`listen_address`](http://cassandra.apache.org/doc/latest/configuration/cassandra_config_file.html?highlight=listen_address#listen-address) 和 [`broadcast_address`](http://cassandra.apache.org/doc/latest/configuration/cassandra_config_file.html?highlight=listen_address#broadcast-address)。为了在 Istio 网格中运行 Cassandra应该将 `listen_address` 参数设置为 `127.0.0.1`,将 `broadcast_address` 参数设置为 Pod IP 地址。
这些配置参数在 Cassandra 配置目录(例如 `/etc/cassandra`)的 `cassandra.yaml` 中定义。有多种用于启动 Cassandra 的脚本(和 yaml 文件),应注意这些脚本如何设置这些参数。例如,一些用于配置和启动 Cassandra 的脚本使用环境变量 `CASSANDRA_LISTEN_ADDRESS` 的值来设置 `listen_address`