WSO2 API 管理器集群 > 我如何配置才能使用此模型?
WSO2 API Manager clustering > How can I configure to work this model?
我正在尝试配置网关集群(1 位经理,2 位使用 Nginx 的工作人员)。
网关集群指南给了我很多帮助,但实际上还不够。
文件的某些部分让我感到困惑,所以我不确定它是否朝着正确的方向前进。请使用下面的概览图片检查我的配置。
Nginx https.conf 设置
upstream wso2.am.com {
sticky cookie JSESSIONID;
server xxx.xxx.xxx.22:9443; <!-- worker node 1 -->
server xxx.xxx.xxx.33:9443; <!-- worker node 2 -->
}
server {
listen 443;
server_name nginx.wso2.com;
location / {
...
proxy_pass http://wso2.am.com;
}
}
* 商店、发布者、密钥管理器设置
每个 api-manager.xml 文件 (/repository/conf/)
<APIGateway>
...
<ServerURL>https://xxx.xxx.xxx.x11:9444/services/</ServerURL>
...
<!-- Does this endpoint work? I received nothing through this setting -->
<GatewayEndpoint>http://nginx.wso2.com, https://nginx.wso2.com</GatewayEndpoint>
...
网关管理节点设置
尤其下面这些和设置是最让人迷惑的
carbon.xml 文件 (/repository/conf/)
<HostName>???</HostName> <!-- should be nginx host? worker host?-->
<MgtHostName>???</MgtHostName> <!-- should be nginx host? or manager node? -->
网关工作节点设置
carbon.xml 文件 (/repository/conf/)
<HostName>???</HostName> <!-- should be nginx host? or worker node? -->
<MgtHostName>???</MgtHostName> <!-- should be nginx host? or manager node? -->
任何意见都会对我有所帮助。
谢谢,问候
图案看起来不错。我建议在生产环境中为 Key manager、Gateway Manager、Publisher 和 Store 使用单独的主机。然而,即使您在同一台机器上有多个组件,您也应该为不同的组件保留不同的主机名。根据您的喜好选择它们。
例如
- 出版商wso2.publisher-apim.com
- 店铺wso2.store-am.com
- 网关管理器wso2.mgt-am.com
- 网关工作者 wso2.am.com
- 密钥管理器wso2.km-am.com
然后你需要根据那个配置Nginx(Map worker node ips to wso2.am.com as per above definition)。
关于管理节点的主机名和mgt主机名,你应该参考的文档是this。
例如。根据以上定义,
<HostName>wso2.am.com</HostName>
<MgtHostName>wso2.mgt-am.com</MgtHostName>
关于Worker节点的主机名和mgt主机名,你应该参考的文档是this。
例如。根据以上定义,
<HostName>wso2.am.com</HostName>
不要取消 MgtHostName 节点的注释。
还按照说明将主机名映射到 IP here and here。此主机名映射在 /etc/hosts 文件中完成,并且仅在 DNS 服务不可用时才需要。
我正在尝试配置网关集群(1 位经理,2 位使用 Nginx 的工作人员)。
网关集群指南给了我很多帮助,但实际上还不够。 文件的某些部分让我感到困惑,所以我不确定它是否朝着正确的方向前进。请使用下面的概览图片检查我的配置。
Nginx https.conf 设置
upstream wso2.am.com {
sticky cookie JSESSIONID;
server xxx.xxx.xxx.22:9443; <!-- worker node 1 -->
server xxx.xxx.xxx.33:9443; <!-- worker node 2 -->
}
server {
listen 443;
server_name nginx.wso2.com;
location / {
...
proxy_pass http://wso2.am.com;
}
}
* 商店、发布者、密钥管理器设置
每个 api-manager.xml 文件 (/repository/conf/)
<APIGateway>
...
<ServerURL>https://xxx.xxx.xxx.x11:9444/services/</ServerURL>
...
<!-- Does this endpoint work? I received nothing through this setting -->
<GatewayEndpoint>http://nginx.wso2.com, https://nginx.wso2.com</GatewayEndpoint>
...
网关管理节点设置
尤其下面这些和设置是最让人迷惑的
carbon.xml 文件 (/repository/conf/)
<HostName>???</HostName> <!-- should be nginx host? worker host?-->
<MgtHostName>???</MgtHostName> <!-- should be nginx host? or manager node? -->
网关工作节点设置
carbon.xml 文件 (/repository/conf/)
<HostName>???</HostName> <!-- should be nginx host? or worker node? -->
<MgtHostName>???</MgtHostName> <!-- should be nginx host? or manager node? -->
任何意见都会对我有所帮助。
谢谢,问候
图案看起来不错。我建议在生产环境中为 Key manager、Gateway Manager、Publisher 和 Store 使用单独的主机。然而,即使您在同一台机器上有多个组件,您也应该为不同的组件保留不同的主机名。根据您的喜好选择它们。
例如
- 出版商wso2.publisher-apim.com
- 店铺wso2.store-am.com
- 网关管理器wso2.mgt-am.com
- 网关工作者 wso2.am.com
- 密钥管理器wso2.km-am.com
然后你需要根据那个配置Nginx(Map worker node ips to wso2.am.com as per above definition)。
关于管理节点的主机名和mgt主机名,你应该参考的文档是this。 例如。根据以上定义,
<HostName>wso2.am.com</HostName>
<MgtHostName>wso2.mgt-am.com</MgtHostName>
关于Worker节点的主机名和mgt主机名,你应该参考的文档是this。 例如。根据以上定义,
<HostName>wso2.am.com</HostName>
不要取消 MgtHostName 节点的注释。
还按照说明将主机名映射到 IP here and here。此主机名映射在 /etc/hosts 文件中完成,并且仅在 DNS 服务不可用时才需要。