WSO2 API Manager Gateway clustering. How to setup gateway endpoint in api-manager.xml

社会主义新天地 提交于 2019-12-21 20:54:09

问题


I have a plan to use WSO2 API manager for my company, so trying to make it work clustering.

it consists of Keymanager, Gateway(manager, worker), Publisher, Store on 2 AWS instances.

Host1 contains Keymanager, Gateway manager, Publisher, Store. Host2 contains Gateway worker.

the point that I'm confusing is how to configure correct setting for in the /repository/conf/api-manager.xml file.

Case 1) set gateway.manager.com in GatewayEndpoint

<APIGateway>
  . . . 
    <ServerURL>https://gateway.manager.com:9444/services/</ServerURL>
    <Username>admin</Username>
    <Password>admin</Password>
    <GatewayEndpoint>http://gateway.manager.com:8281, https://gateway.manager.com:8244</GatewayEndpoint>
. . .
</APIGateway>

Case 2) set gateway.worker.com in GatewayEndpoint

<APIGateway>
  . . . 
    <ServerURL>https://gateway.manager.com:9444/services/</ServerURL>
    <Username>admin</Username>
    <Password>admin</Password>
    <GatewayEndpoint>http://gateway.worker.com:8280, https://gateway.worker.com:8243</GatewayEndpoint>
. . .
 </APIGateway>

hosts 200.100.100.123 gateway.manager.com 200.100.100.234 gateway.worker.com


Thanks, Regards


回答1:


You don't need to APIGateway configuration on Gateway Manager, since you are using Gateway Manager, Key Manager, Publisher, Store in one node.

You can configure you Gateway Manager node as below

<APIGateway>
    <Environments>
        <Environment type="hybrid">
        ...
            <ServerURL>https://gateway.manager.com:9443/services/</ServerURL> <!-- To deploy API to gateway Manager -->
            <Username>admin</Username>
            <Password>admin</Password> 
            <GatewayEndpoint>http://gateway.worker.com:8280,https://gateway.worker.com:8243</GatewayEndpoint> <!-- To show the gateway worker URLs for API in API Store -->
        </Environment>
    </Environments> 
    ...
</APIGateway>

You don't need to configure anything on Gateway Worker Node.




回答2:


You dont need to define gateway manager URL in gateway endpoints section. Gateway endpoints section will be used at API store to list API gateway URLs when you click on API and see details. So you can use following configurations for all nodes without any issue.

<GatewayEndpoint>http://gateway.worker.com:8280, https://gateway.worker.com:8243</GatewayEndpoint>

You need to define gateway server URL as follows in publisher mainly because it will use this URL to publish API to gateway manager.

<ServerURL>https://gateway.manager.com:9444/services/</ServerURL>


来源:https://stackoverflow.com/questions/38872249/wso2-api-manager-gateway-clustering-how-to-setup-gateway-endpoint-in-api-manage

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!