wso2wso2-api-managerapi-manager

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


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


Solution

  • 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.