繁体   English   中英

如何配置WSO2 API管理器网关和密钥管理器群集设置?

[英]How do I configure WSO2 API Manager Gateway and Key Manager Cluster settings?

我正在使用以下架构来实现WSO2 API管理器:单个发布者/商店节点。 两个服务器都在其上运行网关和密钥管理器的2节点群集。

当我关注时: http : //docs.wso2.org/display/CLUSTER420/Clustering+API+Manager#ClusteringAPIManager-Configuringcomponentfeatures

然后进入api-manager.xml的“配置组件之间的连接”的步骤,当我为以下配置网关时感到困惑:

   <APIKeyManager>
     <ServerURL>https://keymanager.apim-wso2.com:9444/services/</ServerURL>        
     <Username>admin</Username>  
     <Password>admin</Password>   
     ...
   </APIKeyManager> 

API密钥管理器的每个网关/密钥管理器节点都应该指向自己吗?

此外,由于当我为authmanager和AP​​IGateway配置它们的api-manager.xml时,我的发布者和商店位于不同的服务器上,我是否将其指向集群名称? 配置时:

   <AuthManager>
       <ServerURL>https://keymanager.apim-wso2.com:9444/services/</ServerURL>      
       <Username>admin</Username>
       <Password>admin</Password>
   </AuthManager> 
   <APIGateway>  
     <Environments>
        <Environment type="hybrid">
          <ServerURL>https://gwmanager.apim-wso2.com:9445/services/</ServerURL>         
          <Username>admin</Username>
          <Password>admin</Password> 
          <GatewayEndpoint>http://gwmanager.apim-wso2.com:8282,https://gwmanager.apim-         
             wso2.com:8245</GatewayEndpoint>
        </Environment>
      </Environments>
    </APIGateway> 

在回答您的问题之前,让我解释一下他们的观点。

  1. 配置网关时,需要指定密钥管理器。

  2. 配置存储时,需要同时指定密钥管理器和网关。

  3. 配置发布者时,需要指定网关。(在1.4.0之前,发布者还需要密钥管理器)。

由于网关会收到访问API的请求,因此需要第一个请求,这些请求必须经过身份验证。 因此,网关应该知道密钥管理器的端点。

另一方面,在创建新的API时,需要触发有关它们的网关,因此发布者需要像3rd中那样了解网关的端点。

同样,Store需要约Keymanager和网关。

这也由“配置组件之间的连接”中给出的图表说明。

假设(根据[1]),gateway + keymanager位于部署的同一节点中,则应该将gateway + keymanager节点中的yes元素配置为指向自身。

例如,

<APIKeyManager> 
  <ServerURL>https://gateway-plus-keymanager.apim-wso2.com:9444/services/</ServerURL>
  <Username>admin</Username>
  <Password>admin</Password>
  ...
</APIKeyManager>

同样,如果您有store + publisher节点

<APIKeyManager> 
  <ServerURL>https://gateway-plus-keymanager.apim-wso2.com:9444/services/</ServerURL>
  <Username>admin</Username>
  <Password>admin</Password>
  ...
</APIKeyManager>

<AuthManager>
    <ServerURL>https://gateway-plus-keymanager.apim-wso2.com:9444/services/</ServerURL>
    <Username>admin</Username>
    <Password>admin</Password>
</AuthManager>

<APIGateway>
  <Environments>
    <Environment type="hybrid">
        <ServerURL>https://gateway-plus-keymanager.apim-wso2.com:9444/services/</ServerURL>
        <Username>admin</Username>
        <Password>admin</Password>          
        <GatewayEndpoint>http://gateway-plus-keymanager.apim-wso2.com:8281,https://gateway-plus-keymanager.apim-wso2.com:8244</GatewayEndpoint>
    </Environment>
  </Environments>    
</APIGateway>

在这里请注意,节点gateway + keymanager节点的主机名为gateway-plus-keymanager.apim-wso2.com,并使用端口偏移1启动了服务器。

[1] 如何配置WSO2 API管理器网关和密钥管理器群集设置?

如果您使用的是DNS轮询,则两个serverURL都应指向https://gateway-plus-keymanager.apim-wso2.com:9444/services/并且您的DNS应该配置为具有两个GW / KM的IP伺服器

嗨,我相信您在部署体系结构中有问题。 如果没有在两个网关(GW)节点前面放置负载平衡器(LB),则没有意义。 因此,您的GW / KM 2节点应带有负载均衡器。 您在GW节点中指向的KM URL实际上应该指向可以在两个KM节点之间分配流量的(LB)。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM